Board index » cppbuilder » OpenGL #include problem

OpenGL #include problem

I've got a set of classes, GLDisplayMan and GLScene for a modeller I'm
working on. The problem is, I can't seem to get OpenGL to include properly!

I've tried
    #include <gl\gl.h>
    #include <gl\glu.h>

in both headers and cpp files, as well as with the main form. If I include
the gl files in GLScene (which is included in GLDisplayMan) it finds the
functions okay, but ends up with multiple declarations of WINGDIAPI. But if
I include it in the GLDisplayMan, which also uses gl functions, it doesn't
recognize the glClearColor, etc. in the GLScene file.

Can anyone tell me the proper way to do this?

Thanks
Lonnie

 

Re:OpenGL #include problem


Quote
Lonnie Ezell <kilis...@QuixNet.net> wrote in message

news:8cueou$fcd5@bornews.borland.com...

Quote
> I've got a set of classes, GLDisplayMan and GLScene for a modeller I'm
> working on. The problem is, I can't seem to get OpenGL to include
properly!

> I've tried
>     #include <gl\gl.h>
>     #include <gl\glu.h>

> in both headers and cpp files, as well as with the main form. If I include
> the gl files in GLScene (which is included in GLDisplayMan) it finds the
> functions okay, but ends up with multiple declarations of WINGDIAPI.

Try #include <windows.h> before gl.h.

--
Regards,
Scott
http://www.gnt.net/~heiman
reply to heiman at gnt dot net

Other Threads