Export dll [message #481482] |
Fri, 21 August 2009 08:15  |
Eclipse User |
|
|
|
hey all,
i have a RCP application and want to call a C library (myLib.dll) from
eclipse via JNA (Note that this JNA and not JNI).
I have my library at "c:\myLibraries" everything works fine when i add the
VM argument "-Djna.library.path=c:\myLibraries"
The problem is that i dont wanna have an absolute path in the parameters.
Can somebody tell me how i can export my .dll to the Main application
folder (The folder where also my .exe file is) and do the correct path
settings then?
Thanks alot
Thomas
|
|
|
Re: Export dll [message #481484 is a reply to message #481482] |
Fri, 21 August 2009 08:30   |
Eclipse User |
|
|
|
Ok i think i found a solution, just had to copy the dll to my root folder.
I found a post here where they said that exporting files to the root
folder only works when my product is based on features, is this correct?
or is there another way?
Thanks alot
|
|
|
Re: Export dll [message #481950 is a reply to message #481482] |
Mon, 24 August 2009 19:45  |
Eclipse User |
|
|
|
You can use a Bundle-NativeCode header in your manifest and OSGi will
take care of the library automatically and you don't need to worry about
the library path.
http://litrik.blogspot.com/2007/08/secrets-of-bundle-nativec ode.html
(There are a few bugs in the export/headless build around
Bundle-NativeCode, so you should also specify an Eclipse-PlatformFilter
attribute).
-Andrew
T. Wilhelm wrote:
> hey all,
>
> i have a RCP application and want to call a C library (myLib.dll) from
> eclipse via JNA (Note that this JNA and not JNI).
>
> I have my library at "c:\myLibraries" everything works fine when i add
> the VM argument "-Djna.library.path=c:\myLibraries"
>
> The problem is that i dont wanna have an absolute path in the
> parameters. Can somebody tell me how i can export my .dll to the Main
> application folder (The folder where also my .exe file is) and do the
> correct path settings then?
>
> Thanks alot
> Thomas
>
|
|
|
Powered by
FUDForum. Page generated in 0.03032 seconds