Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8224799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:11:43+00:00 2026-06-07T15:11:43+00:00

I am compiling a project in Visual C++ 2010, but I have problems with

  • 0

I am compiling a project in Visual C++ 2010, but I have problems with some Winsock redefinitions.

First of all I get:

syntax error : identifier 'SOCKADDR_STORAGE'

But if I include winsock or winsock2 or ws2tcpip i get many errors like these:

error C2011: 'sockaddr' : 'struct' type redefinition 
error C2011: 'WSAData' : 'struct' type redefinition
error C2011: 'linger' : 'struct' type redefinition
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:11:45+00:00Added an answer on June 7, 2026 at 3:11 pm

    Your problem is that by including Windows.h, you are also already including winsock.h. It is here your problem arises as including winsock2.h or ws2tcpip.h will attempt to redefine some of the definitions in winsock.h

    By using #define WIN32_LEAN_AND_MEAN before your Windows.h include you stop the compiler from including a lot of the extra stuff that comes with Windows.h

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this error while compiling my Visual C++ project in Visual Studio 2008
I have a .NET project that I've been compiling with Visual Studio and running
When compiling my project, I get the error: Error: D:\Programming\Projects\Aprovado\examwindow.cpp:6: error: invalid use of
I have a ASP.NET MVC 2 project on Visual Studio 2010. I want to
I'm compiling a 64 bit c++ project on visual studio pro 2010 and I'm
I have the following warnings while compiling an openFrameworks 007 project on Visual Studio
On the site http://www.springsource.com/download/community?project=Spring.NET is zip with spring.net project for visual studio 2010, but
When compiling a project in Visual Studio, the error message the exec task needs
I have the ActiveMQ-CPP 2.2.1 Visual Studio 2005 project compiling and running. In the
I have created setup project with Visual Studio. I also need some custom actions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.