On Fri, Sep 19, 2014 at 3:33 AM, Amir Reda <amirale...@gmail.com> wrote: > thx allot for quick reply > i have modified the library name to ssl but i have the same problem with the > linker > > error is > > Building file: ../src/certificate.cpp > Invoking: Cross G++ Compiler > g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/certificate.d" > -MT"src/certificate.d" -o "src/certificate.o" "../src/certificate.cpp" > Finished building: ../src/certificate.cpp > > Building file: ../src/client.cc > Invoking: Cross G++ Compiler > g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/client.d" > -MT"src/client.d" -o "src/client.o" "../src/client.cc" > Finished building: ../src/client.cc > > Building target: certificate > Invoking: Cross G++ Linker > g++ -L/usr/include/openssl -o "certificate" ./src/certificate.o > ./src/client.o ./src/server.o -lssl > ./src/client.o: In function `Client::Client()': > /home/amirale32/workspace/certificate/Debug/../src/client.cc:12: undefined > reference to `X509_REQ_new' > ...
I believe that should be: g++ -L/usr/lib '-L' is for library paths, not include paths. Additionally, you need to include both libraries in your linker invocation. So it should be: g++ *.o -o myprogr.exe -L/usr/lib -lssl -lcrypto 'ld' is a single pass linker, so the order of '-lss -lcrypto' matters. See the ld(1) man page for details. http://linux.die.net/man/1/ld. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org