<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
hi,
<br>try using the ld -G x.o -o libx.so instead of ld - shared, or try the
g++ -shared -L command.
<br>hope this helps, bye,
<br>Jharana
<p>Dorothy Wu wrote:
<blockquote TYPE=CITE><style></style>
<font face="Arial"><font size=-1>hi,</font></font><font face="Arial"><font size=-1>I
met a problem when I use JNI.</font></font> <font face="Arial"><font size=-1>I
wrote two shared libraries (c/c++).</font></font><font face="Arial"><font size=-1>Then
I used them in my c/c++ application.</font></font><font face="Arial"><font size=-1>Everything
is Ok, my c/c++ application can use these libraries.</font></font> <font face="Arial"><font size=-1>But
when I use it in kaffe by JNI,</font></font><font face="Arial"><font size=-1>Only
one library can load, another can never loaded by System.load().</font></font><font face="Arial"><font size=-1>Error
is:</font></font><font face="Arial"><font size=-1>"UnsatisfiedLinkError:
file not found."</font></font> <font face="Arial"><font size=-1>I
have checked the path, everything is OK.</font></font><font face="Arial"><font size=-1>The
difference between these two libraries is, the latter do not link any library.</font></font><font face="Arial"><font size=-1>The
link command is:</font></font><font face="Arial"><font size=-1>"ld -shared
--whole-archive x.o y.o -o libxy.so"</font></font><font face="Arial"><font size=-1>I
do not think it is the reason why I can not load it.</font></font> <font face="Arial"><font size=-1>But
why, it is a bug of System.load()?</font></font> <font face="Arial"><font size=-1>Thanks!</font></font> <font face="Arial"><font size=-1>Stock
Wu</font></font> </blockquote>
</body>
</html>
<html>
<br>
*********************************************************<br>
Disclaimer<br>
<br>
This message (including any attachments) contains <br>
confidential information intended for a specific <br>
individual and purpose, and is protected by law. <br>
If you are not the intended recipient, you should <br>
delete this message and are hereby notified that <br>
any disclosure, copying, or distribution of this<br>
message, or the taking of any action based on it, <br>
is strictly prohibited.<br>
<br>
*********************************************************<br>
Visit us at http://www.mahindrabt.com<br>
<br>
</html>