curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Can't build CURL with nghttp2 statically

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 27 Nov 2017 17:52:03 -0500

On 11/27/2017 4:53 PM, Thomas van Hesteren via curl-library wrote:
> As you stated I have updated the code to:
> i686-w64-mingw32-g++ -Wall -static Programm.cpp -o Programm.exe
> -I/opt/mingw64/Win32/include -L/opt/mingw64/Win32/lib -static-libgcc
> -static-libstdc++ -DCURL_STATICLIB -DNGHTTP2_STATICLIB -lcurl
> -lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz -lpthread -lws2_32 -std=c++11
>
> However, the errors stay.

Please stop top-posting it makes the conversation harder to follow [1].
The error you are seeing is because I think you can only build libcurl
against static or dynamic nghttp2 at one time for windows. Try building
libcurl like CPPFLAGS="-DNGHTTP2_STATICLIB" ./configure ...  and then
libcurl.a expect the regular symbols in nghttp2 static.

You may need LDFLAGS="-static" PKG_CONFIG="pkg-config --static" to build
a static curl.exe

[1]: https://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-11-27