Minimal libcurl compile for windows
Date: Wed, 6 May 2020 19:25:28 +0000
I did this
Compiling the static lib on windows with nmake yields libcurl_a.lib and a
bunch of obj files,
libcurl_a.lib needs to be in the folder with the obj files in order for my
program to compile without unresolved externals.
Which is GREAT! But,
I can't seem to disable certain curl features using nmake, the same way I
can do with
./configure && make && make install
./configure --disable-ares --disable-cookies --disable-crypto-auth
--disable-ipv6 --disable-manual --disable-proxy --disable-verbose
--disable-versioned-symbols --enable-hidden-symbols --without-libidn
--without-librtmp --without-ssl --without-zlib --disable-dict
--disable-file --disable-ftp --disable-gopher --disable-imap --disable-ldap
--disable-ldaps --disable-pop3 --disable-rtsp --disable-smtp
--disable-telnet --disable-tftp --disable-pthread --prefix=/curl
This is the configure command I use on git-bash sdk on the same windows VM
where I used nmake. Everything compiles without erros except the fact that
all I get is the libcurl.a library instead of libcurl_a.lib.
Using it in my program (x64/windows; http-get request to read string from
given host)
`
#include "curl/curl.h"
#pragma comment (lib, "crypt32.lib")
#pragma comment (lib, "advapi32")
#pragma comment (lib, "ws2_32.lib")
#pragma comment (lib, "wldap32.lib")
#pragma comment (lib, "normaliz.lib")
#pragma comment (lib, "libcurl/libcurl.a")
`
gives me 6 unresolved externals.
https://pastebin.com/raw/fFPVHZGR
I tried linking all the .o files to libcurl.a when compiling, with no luck.
I expected the following
make install to produce the libcurl_a.lib file
curl/libcurl version
7.70.0
I have been looking everywhere and I've spend nearly 10 hours today trying
to get this sorted, what am I possibly doing wrong?
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-06