libcurl redefinition error while building from source for visual studio

110 views Asked by At

I'm trying to build libcurl from source without using dll for visual studio , but getting redefinition error Error list

\curl-7.72.0\lib\share.c(35,20): error C2371: 'curl_share_init': redefinition; different basic types
\curl-7.72.0\include\curl\curl.h(2732): message : see declaration of 'curl_share_init'
1

There are 1 answers

0
LIJIN T V On

This issue was resolved . By placing #define BUILDING_LIBCURL when you build libcurl. Note that this define must only be set when you build libcurl, not for code that uses it.