Skip to content

Instantly share code, notes, and snippets.

@qigao
Created November 29, 2015 17:22
Show Gist options
  • Save qigao/298524e1ce969fe8f253 to your computer and use it in GitHub Desktop.
Save qigao/298524e1ce969fe8f253 to your computer and use it in GitHub Desktop.
Compile and use static libcurl
$./configure --enable-shared=no --without-zlib --disable-ftp --disable-ldap --disable-rtsp --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --without-ssl --without-libssh2 --without-libidn --without-librtmp --disable-dict --disable-file
$ make install
$ gcc -I/usr/local/include -g -O2 -DCURL_STATICLIB -c post.c
$ gcc -s -o post.exe post.o -L/usr/local/lib -lcurl -lws2_32
$ gcc -s -o post.dll post.o -L/usr/local/lib -lcurl -lws2_32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment