#ifndef WS_UTIL_H
#define WS_UTIL_H
#include <winsock.h>
SOCK EstablishConnection(hostent *pheHost, sockaddr_in *saHost, char *szHost, WORD wPort);
int RecvData(SOCK Socket, char *szBuffer);
int SendData(SOCK Socket, char *szBuffer);
int CancelConnection(SOCK Socket, bool bShutdown);
#endif // WS_UTIL_H
The identifier that the compiler thinks is missing an '';'' before it is EstablishConnection. I never checked, but I don''t think winsock.h misses a '';'' ;-).
Any ideas?
missing ';' before identifier...
I know this compiler error usually means that you forgot to end a statement with a '';'', but the header in which this error occurs is the first header included in the main source-file, and there are no statements before it! Here''s the header...
"It's strange, isn't it? You stand in the middle of a library and go 'AAAAAAAGGHHHH' and everyone just stares at you. But you do the same thing on an airplane, and everyone joins in!"
Yup, SOCK is nothing but a int typedef''ed in winsock.h...
Any OTHER ideas?
Any OTHER ideas?
"It's strange, isn't it? You stand in the middle of a library and go 'AAAAAAAGGHHHH' and everyone just stares at you. But you do the same thing on an airplane, and everyone joins in!"
November 14, 2002 02:44 PM
the compiler doesn''t know SOCK
maybe it''s typedefed inside an #if which isn''t satisfied...
maybe it''s typedefed inside an #if which isn''t satisfied...
probably errors in other header files. for example:
it''s the .cpp files that get compiled, thus errors are there, not in headers. I believe if you make one .cpp file, and just #include "wsutil.h" and nothing else in it, it won''t give you any errors. check your other files (sadly).
My compiler generates one error message: "does not compile."
// in some.cpp#include "someheader.h" // error here#include "wsutil.h" // this get infected
it''s the .cpp files that get compiled, thus errors are there, not in headers. I believe if you make one .cpp file, and just #include "wsutil.h" and nothing else in it, it won''t give you any errors. check your other files (sadly).
My compiler generates one error message: "does not compile."
November 14, 2002 02:53 PM
are you sure?
try this just in case:
#ifndef SOCK
#define SOCK int
#endif
try this just in case:
#ifndef SOCK
#define SOCK int
#endif
November 14, 2002 02:57 PM
if you''re using vc++ 6.0, winsock.h has SOCKET as the typedef.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement