Thanks for your answer,

I didn't mention it but I already use -DCURL_STATICLIB in my CFLAGS, wich allowed me to use libcurl without the DLL, but only this flag isn't enough, I need to tell mingw to use every needed library statically, so the problem persists.


On 05/11/2018 11:55 AM, Jeroen Ooms wrote:
On Thu, May 10, 2018 at 7:56 PM, [email protected] <[email protected]> wrote:
Hello !

I'm not sure if it's the right place to ask, don't hesitate to redirect me
;)

I've been trying for several weeks now to compile libcurl statically using
mingw-w64-gcc on arch linux, I successfully linked libcurl, libssl,
libcrypto, libssh2, libz and libidn2 statically (I can now run my exe
without the corresponding DLL's), but when i try to link the last needed
library statically, libunistring, I get the following errors :

undefined reference to `__imp_uninorm_nfc'

undefined reference to `__imp_UC_CATEGORY_M'

Seems like a lib is missing, but I can't find wich one.

I use the following LDLIBS in my makefile :

LDLIBS = -l:libcurl.a -l:libssl.a -l:libcrypto.a -l:libssh2.a -l:libz.a
-l:libidn2.a -l:libunistring.a -lws2_32 -lgdi32 -lwldap32  -liconv

(When I replace -l:libunistring.a by -lunistring, the error disappears, and
libunistring-2.dll is needed again).

Do you have any idea how I can fix it ?
Make sure you compile the appliation that you want to link against
libcurl using this cflag:

   -DCURL_STATICLIB

Otherwise you can only dynamically link. After that I always link with:

   -lcurl -lssh2 -lz -lssl -lcrypto -lgdi32 -lws2_32 -lcrypt32 -lwldap32
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

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

Reply via email to