________________________________
> From: curl-library <curl-library-boun...@cool.haxx.se> on behalf of Salda via 
> curl-library <curl-library@cool.haxx.se>
> Sent: 06 June 2019 00:55
> To: curl-library@cool.haxx.se
> Cc: Salda
> Subject: [DKIM] Fwd: building simple program using libcurl on Win64

> Some help see below? Btw I don't want to install MinGW64 for their libraries 
> and that's why I wanted to try Clang instead of GCC.

> Predmet: building simple program using libcurl on Win64
Hello,

see 
https://stackoverflow.com/questions/56378660/how-to-correctly-statically-link-libcurl-on-windows-using-clang-64bit

so.. How do I build simple program using libcurl on 64-bit Windows?
I have LLVM in path and have clang++ -static -DCURL_STATICLIB 
curl-7.64.1-win64-mingw/lib/libcurl.a http-post.cpp -std=c++17 -g -Xclang 
-flto-visibility-public-std -o trading.exe, but it misses some libraries and 
function definitions. I guess I would fix it on my own somehow, but I am 
looking for the most correct and preferred way...

Thanks,
Lukas Salich


??You're using static curl library. Static libraries do not carry dependency 
linking information, which means you have to provide all the dependencies on 
the command line. From the quick scan of the SO question, you have to link with 
at least winsock, nghttp2, and OpenSSL. Maybe something more. Moreover, the 
order in which you're linking may be important. Generally unless you really 
need static linking, it's better (and definitely easier) to use shared objects.

--
Jakub
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to