Sign in to follow this  
argonaut

help with winsock2.h

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this