因项目需要静态编译,折腾好久,总结如下:
1.用不到的库都disable掉
./configure --disable-shared --enable-static --without-libidn --without-ssl --without-librtmp --without-gnutls --without-nss --without-libssh2 --without-zlib --without-winidn --disable-rtsp --disable-ldap --disable-ldaps --disable-ipv6
2.
make
3.生成的libcurl.a 在curl7440/lib/.libs/下
链接的时候
libcurl.a -lrt -lz
不加-lrt 会出现
undefined reference to `clock_gettime'