I’m fighting not the first hour with connecting libcurl under RadStudio XE. I downloaded the latest version, added #include "curl/curl.h" , got a lib-file from the libcurl.dll library - added it to the project. Threw 4 dll in system32:

  • libcurl
  • zlib1
  • libeay32.dll
  • ssleay32.dll

The builder gives a link error.

[ILINK32 Error] Error: Unresolved external '_curl_easy_init' referenced from D: ...

And stuff like that ... What can fix this problem?

  • and the project you have 32 or 64bit? it looks like 64. - KoVadim
  • 32 bit. In XE there is no possibility to compile 64 bits. - T2skler
  • 2
  • Thank you. The lib file came up. - T2skler 1:21 pm

1 answer 1

You need to write macros

 #define CURL_STATICLIB 

Then connect libcurl.lib ws2_32.lib Wldap32.lib and #include <curl\curl.h> Should earn.

Here is an example for a visual

 #define CURL_STATICLIB #pragma comment( lib, "libcurl.lib" ) #pragma comment( lib, "ws2_32.lib" ) #pragma comment( lib, "Wldap32.lib" ) #include <curl\curl.h> 
  • The man clearly said that he wants to connect Curl as a DLL. What does it have to do then CURL_STATICLIB ? - AnT