Hi,
I'me developing a C++ library .so that will be installed on a Linux box.

The step I've followed are:

1) Wrote a C++ code
2) Copied the libSQLDBC.o and libSQLDBC.a in /lib and /usr/lib
3) Compiled my code with the following command: 
gcc -shared -o libMyLib.so -I/home/myUser/sapdb-linux/incl
-I/usr/lib/j2sdk1.4.2/include -I/usr/lib/j2sdk1.4.2/include/linux
-L/home/myUser/sapdb-linux/lib -lSQLDBC myLibSourceCode.cpp
4) As my library is accessed through a Java Native Interface the running
command is the following:
java -cp myJavaApp.jar:junit.jar myJavaAppTest 
(it's junit class test)
The output is the following:

testMethod(myJavaAppTest)java.lang.UnsatisfiedLinkError:
/home/myUser/libMyLib.so: /home/myUser/libMyLib.so: undefined symbol:
_ZN6SQLDBC16GetClientRuntimeEPci
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1456)
        at java.lang.Runtime.load0(Runtime.java:737)
        at java.lang.System.load(System.java:811)
        ...
          ...

I've tried to compile and execute the HelloWorld application I've found in
the sapdb-sqldbc-linux-32bit-i386-7_4_4_3beta.tgz archive (the libSQLDBC.so
and .a I'm using are in this tgz) and the error is similar. Moreover the
original version of this code was developed under Windows (instead of a .so
there is, obviously, a dll) and it works fine.
The system on which I'm developing/testing is a Debian and the SapDB which I
should connect to is a 7.4.03

Any suggestion?

TIA
Alexio


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to