g++ -I./ -Wall -DFUNCTION_TEST -g -c sample.cpp -o sample.o
sample.cpp: In function ‘int main(int, char**)’:
sample.cpp:57:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
sample.cpp:58:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
sample.cpp:59:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
sample.cpp:69:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
sample.cpp:70:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
gcc sample.o base64.o -lpthread -lm -lstdc++ ./json-cpp/lib/libjson.a ./curl/lib/libcurl.a -o test
./curl/lib/libcurl.a(libcurl_la-timeval.o): In function `curlx_tvnow':
timeval.c:(.text+0xf): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make: *** [test] Error 1
招谁惹谁之提问:
It's solved! Add "-lrt" at the end of "LIBS=-lpthread -lm -lstdc++ ./json-cpp/lib/libjson.a ./curl/lib/libcurl.a"
回复招谁惹谁之提问:感谢您的分享
招谁惹谁之提问:
It's solved! Add "-lrt" at the end of "LIBS=-lpthread -lm -lstdc++ ./json-cpp/lib/libjson.a ./curl/lib/libcurl.a"
回复招谁惹谁之提问:感谢您的分享
It's solved! Add "-lrt" at the end of "LIBS=-lpthread -lm -lstdc++ ./json-cpp/lib/libjson.a ./curl/lib/libcurl.a"