I am developing an application in Linux, which requires static library of curl.Only http and https support is required.I have tried many ways like -Wl,-Bstatic -libcurl , linking to libcurl.a etc. Most alarming is that, I haven't seen anybody who has been successful in doing so, in linux.Only thing I found was in Windows, Linking project with statically build curl
But in linux , almost all answers are like following.
Static linking libcurl using c.
Is it so? Whether it is impossible to make standalone library of curl in linux ?
Following are my build options and results
- -Wl,-Bstatic -pthread -lcrypto -Wl,-Bdynamic -ldl -lcurl No error !!!!!
- -Wl,-Bstatic -pthread -lcrypto -ldl -lcurl errors ... cannot find -lgcc_s
- -static -pthread -lcrypto -ldl -lcurl lot of errors starting with undefined reference "idn_free" 4.-static -pthread -lcrypto -ldl -ldn -lcurl no change.... lot of errors starting with undefined reference "idn_free"
- -static /usr/lib/i386-linux-gnu/libpthread.a /usr/lib/i386-linux-gnu/libcrypto.a /usr/lib/i386-linux-gnu/libdl.a /usr/lib/i386-linux-gnu/libidn.a /usr/lib/i386-linux-gnu/libcurl.a no change.... lot of errors starting with undefined reference "idn_free"