Using libcurl with wxDev-C++
Just had to do some C++ development on a Windows 7 machine so I downloaded and installed wxDev-C++ on
my machine and download the required packages for libcurl and added the -lcurl
to the linker options
for the project.
The problem came when I tried to compile to code, I got the following errors
[Linker Error] undefined reference to `_imp__curl_easy_init'
[Linker Error] undefined reference to `_imp__curl_easy_setopt'
[Linker Error] undefined reference to `_imp__curl_easy_perform'
[Linker Error] undefined reference to `_imp__curl_easy_cleanup'
[Linker Error] undefined reference to `_imp__curl_easy_init'
[Linker Error] undefined reference to `_imp__curl_easy_init'
[Linker Error] undefined reference to `_imp__curl_easy_setopt'
[Linker Error] undefined reference to `_imp__curl_easy_setopt'
[Linker Error] undefined reference to `_imp__curl_easy_setopt'
They all looked like I was missing the curl library, but it was in the linker options. After looking through the libraries available I discovered that there was a second libcurl library, libcurldll.a, so I changed the linker options to include
-lcurl -lcurldll
Having added in the extra library I could recompiled the code without any problems.
Jason
— 2012-01-12