Advertisement

help with winsock2.h

Started by September 06, 2006 05:52 PM
1 comment, last by argonaut 18 years, 5 months ago
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?
~Argonaut________________________________Why "~Argonaut"? It's all just a mathematical expression denoting a close approximation of "Argonaut", which is irrational and can't be precisely defined.
I got that problem, so I just included winsock first, fixed the problem.

OpenGL libraries seem to do it though.
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.
~Argonaut________________________________Why "~Argonaut"? It's all just a mathematical expression denoting a close approximation of "Argonaut", which is irrational and can't be precisely defined.

This topic is closed to new replies.

Advertisement