winsock.h compile error - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

winsock.h compile error

Hi!

I'm trying to use textures in my opengl program. I download files to do this, but I can't compile because I recieve this error: (Visual C++ 6.0)

--------------------Configuration: nehegl_glut - Win32 Debug--------------------
Compiling...
nehegl_glut.cpp
c:archivos de programamicrosoft visual studiovc98includewinsock.h(92) : error C2011: 'timeval' : 'struct' type redefinition
Error executing cl.exe.

nehegl_glut.obj - 1 error(s), 0 warning(s)

I've observed that this error appears when I include a header file that includes windows.h

My includes are:

#include
#include
#include
#include
#include
#include
#include
#include

In this case, if I take glaux.h away, it compiles normally.

HELP!

Comments

  • NIN666NIN666 Posts: 90Member
    : Hi!
    :
    : I'm trying to use textures in my opengl program. I download files to do this, but I can't compile because I recieve this error: (Visual C++ 6.0)
    :
    : --------------------Configuration: nehegl_glut - Win32 Debug--------------------
    : Compiling...
    : nehegl_glut.cpp
    : c:archivos de programamicrosoft visual studiovc98includewinsock.h(92) : error C2011: 'timeval' : 'struct' type redefinition
    : Error executing cl.exe.
    :
    : nehegl_glut.obj - 1 error(s), 0 warning(s)
    :
    : I've observed that this error appears when I include a header file that includes windows.h
    :
    : My includes are:
    :
    : #include
    : #include
    : #include
    : #include
    : #include
    : #include
    : #include
    : #include
    :
    : In this case, if I take glaux.h away, it compiles normally.
    :
    : HELP!
    :

    Why do you have glut, and all the gl headers included? Last time I used glut, which I'll admit was years ago, it included all the gl headers. If your version of glut also does you will need to NOT include it, it also should include windows.h if you have the windows version. If nothing else you could find the definition of that structue and add #ifdef,#define, #endif blocks to prevent it from being defined multiple times.
    [hr]Ethereal software and Mag monitors, doesn't get much better now does it?

Sign In or Register to comment.