Advertisement

01.16.2006 at 03:01PM PST, ID: 21698719
[x]
Attachment Details

Winsock2.h and wstcpip.h problems

Asked by mikelodder in Microsoft Visual C++.Net

Tags: , ,

I'm trying to compile code made in VS 6.0 in VS2003 .NET and I get the following errors

My program generates errors along the lines of
error C2011: 'fd_set' : 'struct' type redefinition

and tons of other ones like it.  So I put under c++/preprocessor/preprocessor definitions _WINSOCKAPI_, and that fixed one of my programs before but not this time.  Then I tried

#define WIN32_LEAN_AND_MEAN before windows.h and that didn't work either.

When I use
#ifndef _WINSOCK2API_
#define _WINSOCK2API_
#define _WINSOCKAPI_
#endif

It cuts my errors in half but then they read something like

WS2tcpip.h(28): error C2011: 'ip_mreq' : 'struct' type redefinition

Now all of the errors are in the ws2tcpip.h file now.  any ideas why this is so
Start Free Trial
[+][-]01.17.2006 at 05:29AM PST, ID: 15719070

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.17.2006 at 03:18PM PST, ID: 15724483

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.17.2006 at 07:17PM PST, ID: 15725627

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.17.2006 at 09:15PM PST, ID: 15726126

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.18.2006 at 05:57AM PST, ID: 15728756

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.18.2006 at 06:10AM PST, ID: 15728879

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.18.2006 at 06:11AM PST, ID: 15728892

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.18.2006 at 06:43AM PST, ID: 15729276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.18.2006 at 06:51AM PST, ID: 15729365

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual C++.Net
Tags: redefinition, type, error
Sign Up Now!
Solution Provided By: lakshman_ce
Participating Experts: 1
Solution Grade: B
 
 
[+][-]01.18.2006 at 12:27PM PST, ID: 15732673

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32