Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.