Hello:

I have a source files that use openssl functionality. I want to make a
shared library to use this with Java. I did this following steps:

1º Compile sources:
    gcc -fPIC -g -c -Wall -I/usr/local/java/include \
    -I/usr/local/java/include/linux \
    -I/usr/local/ssl/include \
    -L/usr/local/ssl/lib -ssl -lcrypto *.c

2º Make a shared library:
    gcc -shared -Wl,-soname,TTP.so -o TTP.so *.o -lc

But when I use this shared library "TTP.so", my java program not found
openssl functions. I obtain this error:

java.lang.UnsatisfiedLinkError:
/usr/local/jakarta-tomcat-4.1.12/webapps/pseudomatic/TTP/TTP.so:
/usr/local/jakarta-tomcat-4.1.12/webapps/pseudomatic/TTP/TTP.so: undefined
symbol: PEM_write_DSA_PUBKEY

I think that the problem is in the compilate phase, but I don´t know what is
wrong.

Somebody can help me?. Thanks.

Regards.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to