J
jadrian
I'm trying to create a jni library which which will interface with
routines in an existing shared object library. This existing library
has functions available to many C programs and defines 3 variables as
extern; a char * (ERRMSG), a char array(PROGNAME) and a
long(LOGMSG_SW). By declaring them extern any program can include a
header file with the declarations/definitions of the 3 variables and
have them available to the existing library as sort of global
variables across libraries and standalones.
The jni library compiles fine but I get a runtime error:
The java class could not be loaded. java.lang.UnsatisfiedLinkError:
libShare.so (Symbol resolution failed for /Test/libso/libBOB.so
because:
Symbol ERRMSG (number 89) is not exported from dependent
module java.
Symbol LOGMSG_SW (number 90) is not exported from dependent
module java.
Symbol PROGNAME (number 91) is not exported from dependent
module java.
Examine .loader section symbols with the 'dump -Tv' command.)
The jni library is libShare.so and the existing library is libBOB.so.
Running on AIX 5.2, java 1.5.
I've tried many combinations of declaring the variables in the jni
library from including the header that defines them, declaring them in
the jni library and defining them, all different combinations of
including/excluding them from the Share.imp and Share.exp files all to
no avail. It's interesting the that libBOB.so seems to complain about
"dependent module java" instead of libShare.so which is what invokes
libBOB.so. I did add "libBOB.so" to the System.load() call, also to
no avail.
Any thoughts?
Thanks ...
routines in an existing shared object library. This existing library
has functions available to many C programs and defines 3 variables as
extern; a char * (ERRMSG), a char array(PROGNAME) and a
long(LOGMSG_SW). By declaring them extern any program can include a
header file with the declarations/definitions of the 3 variables and
have them available to the existing library as sort of global
variables across libraries and standalones.
The jni library compiles fine but I get a runtime error:
The java class could not be loaded. java.lang.UnsatisfiedLinkError:
libShare.so (Symbol resolution failed for /Test/libso/libBOB.so
because:
Symbol ERRMSG (number 89) is not exported from dependent
module java.
Symbol LOGMSG_SW (number 90) is not exported from dependent
module java.
Symbol PROGNAME (number 91) is not exported from dependent
module java.
Examine .loader section symbols with the 'dump -Tv' command.)
The jni library is libShare.so and the existing library is libBOB.so.
Running on AIX 5.2, java 1.5.
I've tried many combinations of declaring the variables in the jni
library from including the header that defines them, declaring them in
the jni library and defining them, all different combinations of
including/excluding them from the Share.imp and Share.exp files all to
no avail. It's interesting the that libBOB.so seems to complain about
"dependent module java" instead of libShare.so which is what invokes
libBOB.so. I did add "libBOB.so" to the System.load() call, also to
no avail.
Any thoughts?
Thanks ...