473,837 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems compiling app with winsock. Can someone help me please.

Hi Everyone,

I'm having real problems compiling some source for eVC4++. The errors
I am getting are below:
It all seems to be centred around winsock. If I move the afsock.h
reference to before my other includes then I get lots of errors like
C2011: 'fd_set' : 'struct' type redefinition
warning C4005: 'FD_CLR' : macro redefinition
which I understand are due to the fact that windows.h is being
included in another header file as well as winsock2.h.

If anybody can help me with these I would be eternally grateful.

Cheers,

Erik

These are the errors I get
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(137 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(235 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueu e'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
PocketPhone.cpp
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(137 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(235 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueu e'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
PocketPhoneDlg. cpp
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(137 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(235 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueu e'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
snmp_dummy.cpp
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(137 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(235 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueu e'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
StdAfx.cpp
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(137 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(191 ) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(192 ) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(193 ) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(194 ) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(195 ) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(235 ) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueu e'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(252 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\developme nt tools\windows ce tools\wce420\po cket pc
2003\mfc\includ e\afxsock.h(274 ) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
Error executing clarm.exe.

PocketPhone2k3. exe - 130 error(s), 0 warning(s)

Nov 17 '05 #1
2 2129

"Erik" <erik@[spamm1ngN0spamm 1ng]scrappy.freeser ve.co.uk> wrote in message
news:dg******** *************** *********@4ax.c om...
Hi Everyone,

I'm having real problems compiling some source for eVC4++. The errors
I am getting are below:
It all seems to be centred around winsock. If I move the afsock.h
reference to before my other includes then I get lots of errors like
C2011: 'fd_set' : 'struct' type redefinition
warning C4005: 'FD_CLR' : macro redefinition
which I understand are due to the fact that windows.h is being
included in another header file as well as winsock2.h.

If anybody can help me with these I would be eternally grateful.

Cheers,

Erik

Please don't multipost, you posted to the appropriate NG
microsoft.publi c.windowsce.emb edded.vc, threre is no reason to post the same
question here.
Willy.
Nov 17 '05 #2
Sorry, my mistake. I meant to post it in the embedded one first.
Apologies
On Fri, 8 Jul 2005 18:09:16 +0200, "Willy Denoyette [MVP]"
<wi************ *@telenet.be> wrote:

"Erik" <erik@[spamm1ngN0spamm 1ng]scrappy.freeser ve.co.uk> wrote in message
news:dg******* *************** **********@4ax. com...
Hi Everyone,

I'm having real problems compiling some source for eVC4++. The errors
I am getting are below:
It all seems to be centred around winsock. If I move the afsock.h
reference to before my other includes then I get lots of errors like
C2011: 'fd_set' : 'struct' type redefinition
warning C4005: 'FD_CLR' : macro redefinition
which I understand are due to the fact that windows.h is being
included in another header file as well as winsock2.h.

If anybody can help me with these I would be eternally grateful.

Cheers,

Erik

Please don't multipost, you posted to the appropriate NG
microsoft.publ ic.windowsce.em bedded.vc, threre is no reason to post the same
question here.
Willy.


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
3210
by: Arturo DiDonna | last post by:
Hello everyone. I am trying to compile someone else code and I am stuck with compilation problems using the g++ 3.3 compiler. Basically, when compiling the following code, I get this error message: parsefcns.cc: In function `void get_token(std::ifstream*, char**)': parsefcns.cc:57: error: cannot convert `std::basic_string<char, std::char_traits<char>, std::allocator<char> >' to `char*' in assignment make: *** Error 1
2
1808
by: Susan Baker | last post by:
Hi, I have declared a class MyClass in a header file MyClass.h I have then gone onto define the class in MyClass.cpp. This is (roughly) what the definition (.cpp) file looks like: #include "BaseHeader.h" /****************************************************/ /* Constructors/Destructor */
1
2637
by: Schuco | last post by:
Hello! Can someone tell me is it possible to use Winsock control in Access? If yes please post some examples or web adresses where to find more information. Thank you!
7
2858
by: Nadav | last post by:
Hi I am writing some kind of a storage system that have to deal with large amounts of data passing over the net, Now, I Wonder... traditional programming would use win32 Winsock DLL as the means of data transportation... now, indigo is the new communication layer of the CLR, - Does indigo uses Winsock internally? - Is it possible to use indigo for such a task? - I assume using indigo has it's performance penalty ( doesn't it ? - Does...
6
2882
by: Leandro Berti via DotNetMonster.com | last post by:
Hi All, I wrote a code to do serial communication with an equipament. When i use the code outside of threaded class it seens work properly, but when i put inside a class and execute a thread in the first seconds the communication is ok, later i receive read/write error. I?ve been in MSDN site and there i discover that the read/write error is a INVALID_HANDLE problem. But why??? I just create the serial communication file and use it....
21
2988
by: matvdl | last post by:
I have a system that was originally developed in asp - the pages are saved in SQL (there are over 10,000 pages) and saved to a temp directory in the server when requested by a client. I have updated this system and changed the pages that are saved to the server as aspx - everything works fine and pages can be served - but Its not impossible for a single client to request 100 plus pages in one session - as each page is requested it is...
5
6913
by: kc | last post by:
Hi Just upgrading a app from VB6 to VB.Net. All is going well apart from the Winsock control. The first thing we notice is that there does not appear to be a .Net version (please correct me if wrong). Also when we use the VB6 winsock control in a dotnet version we appear to lose the ability of creating an array on winsock's. for example we cannot assign as thus
4
6603
by: Patrick | last post by:
Hello, I'm currently trying the OpenSSL Library, but I got some problems. I want to create a server and client application that communicate through the OpenSSL API, but this code doesn't work. I tried to understand the error messages but for me they aren't useful. And now I'm here and hope that somebody has experience and can tell me the error. This is the Code for the server: #define _CRT_SECURE_NO_DEPRECATE
0
1635
by: smallGame | last post by:
Hi, I am programing with VisualC++ under Windows vista, I get a problem to link with all winsock functions. I can't find winsock.lib and with the file winsock.dll I get an error message: file no valid. Does someone has a solution for me?
0
9851
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10902
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10286
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7824
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7013
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4481
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4060
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.