コードをコンパイルしようとしています
#include <Header1.h>
#include "Header2..h"
#include <ctype.h>
Header1.h
含むwinsock.h
およびHeader2.h
含むwindows.h
標準エラーである再定義エラーが表示されたため、winsock.h
代わりに使用していますが、提供されたソリューションを使用して修正できませんでした。winsock2.h
winsock2.h
も含めてみws2tcpip.h
ましたが、 で大量の再定義エラーが発生していwinsock.h
ます。
このモジュールで 12 個のエラーが発生しています
error C3861: 'close': identifier not found
error C2664: 'setsockopt' : cannot convert parameter 4 from 'timeval *' to 'const char *'
error C2065: 'socklen_t' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'optionLength'
error C2065: 'optionLength' : undeclared identifier
error C2065: 'optionLength' : undeclared identifier
error C2664: 'setsockopt' : cannot convert parameter 4 from 'int32 *' to 'const char *'
error C2065: 'MSG_WAITALL' : undeclared identifier
error C2664: 'recvfrom' : cannot convert parameter 2 from 'uint8 *' to 'char *'
error C2065: 'ERROR_END_OF_STREAM' : undeclared identifier
error C3861: 'close': identifier not found
error C3861: 'close': identifier not found