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 313447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:06:32+00:00 2026-05-12T08:06:32+00:00

There seems to be a conflict with the windows headers between the mysql c-api

  • 0

There seems to be a conflict with the windows headers between the mysql c-api and boost::asio.

If I include mysql first I get:

boost/asio/detail/socket_types.hpp(27) : fatal error C1189: #error : WinSock.h has already been included

#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
# if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
#  error WinSock.h has already been included
# endif // defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)

If I include boost::asio first I get:

include\config-win.h(24) : warning C4005: ‘_WIN32_WINNT’ : macro redefinition

/* Defines for Win32 to make it compatible for MySQL */
#ifdef __WIN2000__
/* We have to do this define before including windows.h to get the AWE API
functions */
#define _WIN32_WINNT     0x0500
#else
/* Get NT 4.0 functions */
#define _WIN32_WINNT     0x0400
#endif

Is there some way around this, and why is mysql trying to force the windows version and boost trying to enforce that it include winsock its self anyway?

  • 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-05-12T08:06:33+00:00Added an answer on May 12, 2026 at 8:06 am

    The macro redefinition is only a warning. Your code should still compile and link.
    I think your code will even work without any problem.

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

Sidebar

Related Questions

There seems to be a conflict between my two timers, I want to know
I'm not sure if anyone has noticed but there seems to be a conflict
There seems to be no good way to localize a WPF application. MSDN seems
There seems to be a lot of heated discussion on the net about the
There seems to be two major conventions for organizing project files and then many
There seems to be three common approaches for mapping an application end user to
There seems to be multiple extremes when supporting embeddable Java HTTP servers. I have
There seems to be a similar question to this on here but with the
There seems to be too many attributes/parameters in CSS... I want to know all
There seems to be a bug in a Wordpress PHP function that leaves whitespace

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.