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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:53:01+00:00 2026-05-28T13:53:01+00:00

I am using mingw32-make to compile a project to Windows, which depends on a

  • 0

I am using mingw32-make to compile a project to Windows, which depends on a project called libevent2. I keep receiving this error –

util.h:69:25: fatal error: sys/socket.h: No such file or directory

Obviously a file from the Linux API is trying to be included, which won’t work on Windows. Upon further investigation I find however that this file should only be included if WIN32 isn’t defined.

#ifdef WIN32
 #include <winsock2.h>
#else
 #include <sys/socket.h>
#endif
  • 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-28T13:53:02+00:00Added an answer on May 28, 2026 at 1:53 pm

    You should use _WIN32 and may also want to check for __CYGWIN__

    #if defined _WIN32 || defined __CYGWIN__
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm using QT Creator 1.3.1 and trying to compile, but get this error... please
When I compile this I get about 200 lines of compiler errors using MINGW32..I
I'm relearning UNIX commands to use git on windows using MINGW32. When I launch
I'd like to cross-compile some open-source libraries (libiconv, gettext, glib2) for windows using mingw
How to configure mingw32 to cross-compile Direct3D Apps for Windows? Is there any possibility?
I'm trying to (cross-)compile node.js and I get this odd error that appears to
I need to compile my Qt application for Windows while I am using Fedora
I have got a strange compile error while using condition operator. a,b are int
I'm writing a software renderer in g++ under mingw32 in Windows 7, using NetBeans
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button

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.