CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    2

    OpenGL Prob w/ VC++ 6

    Here is my problem - every time I try to build/link one of my OpenGL programs or an OpenGL example, I get the following three errors from my VC++ 6 comiler -

    c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1135) : error C2144: syntax error : missing ';' before type 'void'

    c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1135) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers

    c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1135) : fatal error C1004: unexpected end of file found

    Now the thing that really makes my angry, is that these are errors are in the MS supplied OpenGL header files! I don't understand it... If anyone out there can help me, I would be really really really gratefull (been trying to find the prob for two weekends now). Thanks for reading this, and thanks for any help you can offer. Rob.



  2. #2
    Join Date
    May 1999
    Location
    Oregon, USA
    Posts
    302

    Re: OpenGL Prob w/ VC++ 6

    WINGDIAPI is defined in wingdi.h. Typically, one must include windows.h
    before the GL headers and windows.h will then include a whole pile of
    other headers. Pre-compiling this stuff will really speed things up.
    I always put the GL headers in stdafx.h these days because of this
    (or stdhdr.h when I don't use MFC which isn't often.) Including the
    standard afxwin.h before the GL headers will accomplish the same thing.



  3. #3
    Guest

    Re: OpenGL Prob w/ VC++ 6

    One possibility is that your #define conflicts with the library stuff. Place your #include belows the library #include and see what happens.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured