curl / Mailing Lists / curl-library / Single Mail


Problem linking statically libcurl

From: <>
Date: Thu, 10 May 2018 19:56:41 +0200

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
<> 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 ?



Received on 2018-05-10