I'm writing a C++ dynamic library that works in a workstation that runs Win CE 5.0.
I'm using Microsoft Visual Studio 2008 to build the dll.
The code that's failing is:
#include <curl/curl.h>
using namespace std;
void GetToken(char* serverIPAddress, char* serverPort, char* rFlexDomain, char* email, char* token) {
}
This is the output I'm receiving building my dll:
~driverwceincludescurl/curl.h(126) : error C2146: syntax error : missing ';' before identifier 'curl_socket_t'
~driverwceincludescurl/curl.h(126) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
~driverwceincludescurl/curl.h(126) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
~driverwceincludescurl/curl.h(319) : error C2061: syntax error : identifier 'curl_socket_t'
~driverwceincludescurl/curl.h(329) : error C2079: 'curl_sockaddr::addr' uses undefined struct 'sockaddr'
~driverwceincludescurl/curl.h(333) : error C2065: 'curl_opensocket_callback' : undeclared identifier
~driverwceincludescurl/curl.h(333) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
~driverwceincludescurl/curl.h(333) : error C2086: 'int curl_socket_t' : redefinition
~driverwceincludescurl/curl.h(126) : see declaration of 'curl_socket_t'
~driverwceincludescurl/curl.h(333) : error C2143: syntax error : missing ';' before '('
~driverwceincludescurl/curl.h(333) : error C2062: type 'void' unexpected
~driverwceincludescurl/curl.h(335) : error C2059: syntax error : ')'
~driverwceincludescurlmulti.h(131) : error C2061: syntax error : identifier 'fd_set'
~driverwceincludescurlmulti.h(231) : error C2061: syntax error : identifier 'curl_socket_t'
~driverwceincludescurlmulti.h(252) : error C2061: syntax error : identifier 'curl_socket_t'
~driverwceincludescurlmulti.h(256) : error C2061: syntax error : identifier 'curl_socket_t'
~driverwceincludescurlmulti.h(339) : error C2061: syntax error : identifier 'curl_socket_t'
I'm using Visual Studio 2008 with STANDARD SDK 500 to build my final dll (the one that includes curl.h).
How can I solve this?
question from:
https://stackoverflow.com/questions/65911334/syntax-error-in-curl-h-when-compiling-libcurl-c-lib-for-wince-platform 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…