Library problem in jni.cc on Linux
Thu May 3 07:28:00 GMT 2001
I need some helping hand on this:
I try to link native methods to be statically linked into an executable on Linux.
This does not work. I used --whole-archive, but that only ensures, that the
needed methods are linked into the executable, which is a good thing.
Then i thought, that --export-dynamic would be good and used that, too.
The real problem seems to be the final line
return lt_dlsym (NULL, symname);
I thought, that would search symname inside the executable, but this is not
the case: The first executable instruction of lt_dlsym inside
libltdl/ltdl.c:1663 is this:
last_error = LT_DLSTRERROR(INVALID_HANDLE);
So the call in natRuntime.cc is a pure nop.
Unfortunately, i do not have any clue, how to correct this.
I assume, the executable has to be added to the libraries list
using add_library but i do not know, when and how this should be done.
Please give me some hints.
Thanks in advance,
The early bird gets the worm. If you want something else for
breakfast, get up later.
More information about the Java