locked
winsock2 headfile complie problem on windows mobile 6 professional RRS feed

  • 常规讨论

  • 我在程序中用到了winsock2 headfile文件,编译发现下面的问题。

    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : error C2146: syntax error : missing ';' before identifier '__WSAFDIsSet'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1623) : error C2146: syntax error : missing ';' before identifier 'accept'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1623) : error C2371: '__stdcal' : redefinition; different basic types
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1627) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1644) : error C2146: syntax error : missing ';' before identifier 'bind'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1648) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1665) : error C2146: syntax error : missing ';' before identifier 'closesocket'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1665) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1667) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1682) : error C2146: syntax error : missing ';' before identifier 'connect'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1682) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1686) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1703) : error C2146: syntax error : missing ';' before identifier 'ioctlsocket'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1703) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1707) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1724) : error C2146: syntax error : missing ';' before identifier 'getpeername'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1724) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1728) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1745) : error C2146: syntax error : missing ';' before identifier 'getsockname'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1745) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1749) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1766) : error C2146: syntax error : missing ';' before identifier 'getsockopt'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1766) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1772) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1791) : error C2146: syntax error : missing ';' before identifier 'htonl'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1791) : error C2371: '__stdcal' : redefinition; different basic types
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1793) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1808) : error C2146: syntax error : missing ';' before identifier 'htons'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1808) : error C2371: '__stdcal' : redefinition; different basic types
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1810) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1825) : error C2146: syntax error : missing ';' before identifier 'inet_addr'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1825) : error C2371: '__stdcal' : redefinition; different basic types
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1827) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1842) : error C2146: syntax error : missing ';' before identifier 'inet_ntoa'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1842) : error C2040: '__stdcal' : 'char *' differs in levels of indirection from 'int'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1844) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1859) : error C2146: syntax error : missing ';' before identifier 'listen'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1859) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1862) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1878) : error C2146: syntax error : missing ';' before identifier 'ntohl'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1878) : error C2371: '__stdcal' : redefinition; different basic types
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1880) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1895) : error C2146: syntax error : missing ';' before identifier 'ntohs'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1895) : error C2371: '__stdcal' : redefinition; different basic types
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1897) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1912) : error C2146: syntax error : missing ';' before identifier 'recv'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1912) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1917) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1935) : error C2146: syntax error : missing ';' before identifier 'recvfrom'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1935) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1942) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1962) : error C2146: syntax error : missing ';' before identifier 'select'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1962) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1968) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1987) : error C2146: syntax error : missing ';' before identifier 'send'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1987) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(1992) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(2010) : error C2146: syntax error : missing ';' before identifier 'sendto'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(2010) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(2017) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(2037) : error C2146: syntax error : missing ';' before identifier 'setsockopt'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(2037) : error C2086: 'int __stdcal' : redefinition
    1>        D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(120) : see declaration of '__stdcal'
    1>D:\Program Files\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winsock2.h(2043) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    及时我用系统的例子程序,如果包含winsock2头文件,同样的问题会出现。不过如果我用PocketPc2003编译,就没有问题。
    那位大侠可以帮忙解答呀。
    2009年4月17日 12:26

全部回复