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

E

Erik

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\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(137) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(235) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueue'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
PocketPhone.cpp
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(137) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(235) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueue'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
PocketPhoneDlg.cpp
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(137) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(235) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueue'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
snmp_dummy.cpp
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(137) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(235) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueue'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
StdAfx.cpp
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(137) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2146: syntax error : missing
';' before identifier 'LookupHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(191) : error C2086: 'WINSOCKAPI' :
redefinition
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2146: syntax error : missing
';' before identifier 'AttachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(192) : error C2182: ' WINSOCKAPI 2' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2146: syntax error : missing
';' before identifier 'DetachHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(193) : error C2182: ' WINSOCKAPI 3' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2146: syntax error : missing
';' before identifier 'KillSocket'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(194) : error C2182: ' WINSOCKAPI 4' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2146: syntax error : missing
';' before identifier 'DoCallBack'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CAsyncSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(195) : error C2182: ' WINSOCKAPI 5' :
illegal use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(235) : error C2146: syntax error : missing
';' before identifier 'FromHandle'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2146: syntax error : missing
';' before identifier 'ProcessAuxQueue'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(252) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2146: syntax error : missing
';' before identifier 'AuxQueueAdd'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: 'WINSOCKAPI' : illegal
use of type 'void'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2040: 'WINSOCKAPI' : 'int'
differs in levels of indirection from 'class CSocket *'
c:\program files\development tools\windows ce tools\wce420\pocket pc
2003\mfc\include\afxsock.h(274) : error C2182: ' WINSOCKAPI 10' :
illegal use of type 'void'
Error executing clarm.exe.

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

Willy Denoyette [MVP]

Erik said:
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.public.windowsce.embedded.vc, threre is no reason to post the same
question here.
Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top