I use Libcurl in my application with the C and GNU compiler on a Linux machine. The application also uses OpenSSL libraries and some other libraries. I am trying to statically link libraries, with the exception of lcurl links to other libraries work just fine.
I am trying to compile as below.
gcc -static -I. -o test test.c -lz -lssl -lcrypto -lcurl
Am I doing something wrong? Is there a way to force static links of some librairies (libc for example)?
source share