Building libcurl with SSL support on Windows

前端 未结 10 2267
眼角桃花
眼角桃花 2020-11-27 12:12

I\'m using libcurl in a Win32 C++ application.

I have the curllib.vcproj project added to my solution and set my other projects to depend on it.

How do I bui

10条回答
  •  心在旅途
    2020-11-27 12:38

    If you build with Visual Studio IDE and get 58 odd warnings as the likes of

    "inconsistent dll linkage curl_global_init / curl_msnprintf /..."

    you should add CURL_STATICLIB to the preproccessor definitions.

    so the entire definition line should look like:

    USE_SSLEAY;USE_OPENSSL;CURL_STATICLIB.

    With this all the warning will disappear.

    Some would ignore the warnings and go on using the libs, but then will get corresponding *error*s as the likes of curl_global_init / curl_msnprintf. It can be very annoying.

    Hope it can help somebody.

提交回复
热议问题