Having trouble setting up OpenGL with VC++ 2005

Started by
3 comments, last by CrimsonMemory 17 years, 1 month ago
I'm sure I'm missing something really obvious, but I can't seem to figure out what. When I compile my test program, the compiler flags more than 100 errors in gl.h, and none in my actual program. Are there any sort of flags I should set in order for VC++ to compile gl.h correctly? I'd post code, but the only errors reported are in gl.h. Thanks in advance!
I jumped in a river and what did I see? Black-eyed angels swam with me.- Thom Yorke
Advertisement
you need to add the lib files to your compiler also.

glaux.lib glu32.lib opengl32.lib

under linker->input
Black Sky A Star Control 2/Elite like game
Also you need to #include <windows.h> before gl.h!
Okay, I just found out that I had to include <windows.h> before gl.h - strangely, I only found this out by scouring the internet for a similar problem. Why isn't it mentioned in most tutorials (Windows-specific ones, even!) that this is necessary? Oh well.
I jumped in a river and what did I see? Black-eyed angels swam with me.- Thom Yorke
Oh, and thanks anyway for the help!
I jumped in a river and what did I see? Black-eyed angels swam with me.- Thom Yorke

This topic is closed to new replies.

Advertisement