 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
SVC Guest
|
Posted: Thu Mar 02, 2006 10:03 pm Post subject: #include <winsock2.h> and compiler error |
|
|
Hi,
I have a project in which, in one header file, I have:
#include <winsock2.h>
I cannot compiler the project since I am getting the error:
[C++ Error] winsock2.h(109): E2238 Multiple declaration for 'fd_set'
[C++ Error] winsock.h(54): E2344 Earlier declaration of 'fd_set'
[C++ Error] winsock2.h(112): E2146 Need an identifier to declare
[C++ Error] winsock2.h(153): E2238 Multiple declaration for 'timeval'
What am I doing wrong?
Thanks,
S. |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Mar 02, 2006 11:03 pm Post subject: Re: #include <winsock2.h> and compiler error |
|
|
"SVC" <svchamlian (AT) hotmail (DOT) com> wrote in message
news:44076329$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I have a project in which, in one header file, I have:
#include <winsock2.h
I cannot compiler the project since I am getting the error:
|
Your code is including winsock.h earlier in the compiling. If winsock2.h is
included before winsock.h then winsock.h is automatically disabled. But if
winsock.h is included before winsock2.h, then you get the errors because
winsock2.h is badly designed, and redeclares most things that winsock.h has
already declared.
Gambit |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|