Jump to content
  • Advertisement
Sign in to follow this  
argonaut

help with winsock2.h

This topic is 4423 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I learned early on in using winsock2.h that I must include it before windows.h. However, I was just reworking my current project and I started getting the 57 redefinition errors that you would expect if I were including the libraries in the wrong order. Fine. But, I'M NOT INCLUDING WINDOWS.H ANYWHERE (shouting caps directed at vc++ :) Are there any other libraries that would cause the same conflict, or something else that I should be looking for?

Share this post


Link to post
Share on other sites
Advertisement
I fixed it by moving the order of the includes around. At first I started logically, and then frustration set in and I just started moving things around randomly until the right combination worked. I know that wasn't the best method, but time is starting to become a factor. The last move involved putting <vector> before <winsock2.h>.

I really don't know why those two would interfere with each other, but I'm not really versed much on precompiler directives.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!