BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

#include <winsock2.h> and compiler error

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket)
View previous topic :: View next topic  
Author Message
SVC
Guest





PostPosted: Thu Mar 02, 2006 10:03 pm    Post subject: #include <winsock2.h> and compiler error Reply with quote



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





PostPosted: Thu Mar 02, 2006 11:03 pm    Post subject: Re: #include <winsock2.h> and compiler error Reply with quote



"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.