Hi Andrei, in the application you're linking libcurl.a to, make sure you also define CURL_STATICLIB.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Andrei Gagarin Sent: Saturday, June 06, 2009 5:18 AM To: [email protected] Subject: Static Linking error with mingw32 Hello Everyone, I am new to this list and I am new to C/C++ too. I am doing some development with mingw32 (3.4.5); I downloaded curl-7.19.5-devel-mingw32.zip from the download page. Under the lib directory, each library file has one .a version and one dll.a version. I want to link against libcurl.a statically. I am not a mingw guru but I had some experience with gcc/g++ on linux. I know I should use -LPath and lcurl to link properly. Mingw found libcurl.a but it still complains: undefined reference to `_imp__curl_global_init' and so on. I know the _imp* are usually for dynamic libraries; so I changed lcurl to lcurldll (it has libcurldll.a) and it worked. I throw all the dlls with the package in and my program worked. I want to use the static .a libraries. Did I miss something? Thanks very much. Andrei
