Hi
While I am not a newbie C/C++ developper, my past experience was not much linux
I am now trying to do some dev under TCE using QTcreator as my IDE because I found it quite friendly and quite similar to some tools I've already used.
I had no problem to write and debug 80% of my app but now I want to add curl to do connect my app to a web server.
Context:
- TCE 3.8.4
- Extensions loaded : curl.tcz, curl-dev.tcz, libssh2.tcz, libssh2-dev.tcz, openssl-0.9.8.tcz, openssl-0.9.8-dev.tcz
I am trying to build the basic simple.c (
http://curl.haxx.se/libcurl/c/simple.html) sample code
If I build the sample code by default, I will get some link error because curl functions are not found.
So I added "LIBS+=/usr/local/lib/libcurl.a" the qmake arguments
I now have more errors than before :
Running build steps for project curl-test...
Starting: "/usr/local/bin/make" clean -w
make: Entering directory `/home/tc/dev/curl-test/debug'
rm -f main.o
rm -f *~ core *.core
make: Leaving directory `/home/tc/dev/curl-test/debug'
The process "/usr/local/bin/make" exited normally.
Configuration unchanged, skipping qmake step.
Starting: "/usr/local/bin/make" -w
make: Entering directory `/home/tc/dev/curl-test/debug'
g++ -c -pipe -g -Wall -W -D_REENTRANT -DDEBUG=1 -D_DEBUG=1 -I/tmp/tcloop/qt-4.x-dev/usr/local/mkspecs/linux-g++ -I../curl-test -I/usr/local/include -I. -I../curl-test -I. -o main.o ../curl-test/main.cpp
g++ -Wl,-rpath,/usr/local/lib -o curl-test main.o -L/usr/local/lib /usr/local/lib/libcurl.a -lpthread
/usr/local/lib/libcurl.a(timeval.o): In function `curlx_tvnow':
timeval.c:(.text+0x89): undefined reference to `clock_gettime'
/usr/local/lib/libcurl.a(ssluse.o): In function `Curl_ossl_version':
ssluse.c:(.text+0xc): undefined reference to `SSLeay'
/usr/local/lib/libcurl.a(ssluse.o): In function `Curl_ossl_data_pending':
ssluse.c:(.text+0x252): undefined reference to `SSL_pending'
/usr/local/lib/libcurl.a(ssluse.o): In function `x509_name_oneline':
ssluse.c:(.text+0x387): undefined reference to `BIO_s_mem'
ssluse.c:(.text+0x38f): undefined reference to `BIO_new'
ssluse.c:(.text+0x3b6): undefined reference to `X509_NAME_print_ex'
ssluse.c:(.text+0x3d8): undefined reference to `BIO_ctrl'
ssluse.c:(.text+0x401): undefined reference to `BIO_free'
.... (cut) ...
I have added libssl.a and libssh2.a but still no luck :
Running build steps for project curl-test...
Configuration unchanged, skipping qmake step.
Starting: "/usr/local/bin/make" -w
make: Entering directory `/home/tc/dev/curl-test/debug'
g++ -Wl,-rpath,/usr/local/lib -o curl-test main.o -L/usr/local/lib /usr/local/lib/libcurl.a /usr/local/lib/libssl.a /usr/local/lib/libssh2.a -lpthread
/usr/local/lib/libcurl.a(timeval.o): In function `curlx_tvnow':
timeval.c:(.text+0x89): undefined reference to `clock_gettime'
/usr/local/lib/libcurl.a(ssluse.o): In function `Curl_ossl_version':
ssluse.c:(.text+0xc): undefined reference to `SSLeay'
/usr/local/lib/libcurl.a(ssluse.o): In function `x509_name_oneline':
ssluse.c:(.text+0x387): undefined reference to `BIO_s_mem'
ssluse.c:(.text+0x38f): undefined reference to `BIO_new'
ssluse.c:(.text+0x3b6): undefined reference to `X509_NAME_print_ex'
ssluse.c:(.text+0x3d8): undefined reference to `BIO_ctrl'
ssluse.c:(.text+0x401): undefined reference to `BIO_free'
Could someone let me know what I am doing wrong ?
Thanks for your help.
br
Barbudor