cURL / Mailing Lists / curl-library / Single Mail


Compiling libcurl staticly within DLL-module with mingw32

From: Alexander Tumin <>
Date: Sat, 20 Aug 2011 14:46:33 +0400

Hello, i am having troubles compiling libcurl staticly into dll-module
(aka plugin) with mingw32.

Here is the simple testcase illustrating the problem:

 As you can see in Makefile; module.c is compiled twice:
 * once linked staticly with libstatic_curl.a and
 * once linked dynamicly with libcurl-4.dll

 There is no problems with dynamic build - it just works perfectly as expected.

 The problem is that when it is linked staticly: all module's symbols
becomes completely inaccessible with
 GetProcAddress() function from <windows.h> - it just returns NULL for anything.

 What the possible reason of such behaviour? How it can be fixed?


 P.S. There is no problems with linking libcurl staticly with native
 linux GCC, in .so format, both dynamic and static linking works:
List admin:
Received on 2011-08-20