Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
681 views
in Technique[技术] by (71.8m points)

http - Syntax error in curl.h when compiling libcurl C++ lib for WinCE platform

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...