dcsimg
JNI unsatisfied link error
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mike_Goldsby
Posted On:   Friday, June 22, 2007 05:02 AM

When doing a java System.loadLibrary('name') call, I get 'unsatisfied link error' _ZN6SimPID14INVALID_LOC_IDE. I recognize portions of that mangled name. The Java code I ran javah against contains public class Musik { ... public static class SimPID { ... public static final int INVALID_LOC_ID = 0xffffffff; ... } ... } That's the only appearance of anything like INVALID_LOC_ID, and I never use the symbol in the Java code or the C++ native JNI code. What is it trying to tell me? How can I get rid of this error? Thanks, --Mike    More>>

When doing a java System.loadLibrary('name') call, I get 'unsatisfied link error' _ZN6SimPID14INVALID_LOC_IDE.


I recognize portions of that mangled name. The Java code I ran javah against contains

			
public class Musik {
...
public static class SimPID {
...
public static final int INVALID_LOC_ID = 0xffffffff;
...
}
...
}


That's the only appearance of anything like INVALID_LOC_ID, and I never use the symbol in the Java code or the C++ native JNI code.


What is it trying to tell me? How can I get rid of this error?


Thanks,

--Mike

   <<Less

Re: JNI unsatisfied link error

Posted By:   shiladitya_sircar  
Posted On:   Tuesday, June 26, 2007 11:20 AM

Seems like a load library path issue. In Java you can load a native library:




1.System.loadLibrary(String) and System.load(String). Which allows you to load the library from the "default" path.



2. System.load() allows us to load a library from anywhere via its absolute path.




For case 1, make sure java.library.path is correctly set and thats where you have your native libs. /jre/bin is always in the library path, so if you want to do a quick test throw your libs there and try to load.




For the second option, if you go System.Load you can put your libraries anywhere and load them with absolute path. Note, if you have dependent libraries, i.e a.so depends on b.so then you have to load b.so first before you can load a.so


I hope this helps.
About | Sitemap | Contact