Public Group

# [Solved] Visual C++ Express/OpenGL... what am I missing.

This topic is 4176 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

OK, so I installed the PSDK. Added the directories... all as instructed. And yet I still get errors when trying to compile anything that has <gl.h> or <gl\...> in it. What did I miss? EDIT: Here are all the screens I can think of: [Edited by - CombatHammie on December 16, 2006 9:46:22 PM]

##### Share on other sites
post the errors. You're probably just not linking to the correct libraries.

-me

##### Share on other sites
#pragma comment(lib, "opengl32.lib")

to the top of your main file.

##### Share on other sites
1>------ Build started: Project: Simple, Configuration: Debug Win32 ------1>Compiling...1>Simple.cpp1>c:\...\simple\simple.cpp(1) : fatal error C1083: Cannot open include file: 'gl\glut.h': No such file or directory1>Build log was saved at "...\Debug\BuildLog.htm"1>Simple - 1 error(s), 0 warning(s)========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

#pragma comment(lib, "opengl32.lib") yields the same result.

##### Share on other sites
search you hard drive for gl.h Is it there?

If it is there, you need to go into your project settings and enter the path to that file under "additional include directories" in the properties section of the compiler settings.

right click on the project in the solution explorer -> properties -> C/C++ -> General -> Additional Include Directories.

Installing the SDK should have set the classpath environment variable up correctly but whatevs. just make sure the gl.h header actually exists on your machine. =)

-me

##### Share on other sites
GLUT has nothing to do with standart GL or GLU headers.
GLUT is completly independent library.
So it must be installed independently from PSDK.
Hint: get FreeGLUT - http://freeglut.sourceforge.net/

##### Share on other sites
The Microsoft PSDK doesn't come with glut, you need to download it online. After you download it just copy the appropriate files into the appropriate folders within your PSDK (for example put the glut.h file with the PSDK "gl" folder) so you don't have to be bothered to add additional include folders in your project settings.

##### Share on other sites
Thanks bubu, I completely forgot that GLUT is seperate.

Nevertheless, it's just a side thing. GL.h IS on the machine (in the PSDK) folder.

And no, it looks like classpath environment variables were NOT set automatically during the installation. So the question is what to do now.

[Edited by - CombatHammie on December 15, 2006 6:11:52 PM]

##### Share on other sites
Quote:
 Original post by CombatHammieThanks bubu, I completely forgot that GLUT is seperate.Nevertheless, it's just a side thing. GL.h IS on the machine (in the PSDK) folder.And no, it looks like classpath environment variables were NOT set automatically during the installation. So the question is what to do now.

After you've got glut.h being found what errors do you get? If it says you're missing gl.h or glu.h simply go to Tools->Options, then under the Projects and Solutions node click on VC++ Directories and then add the directories to the PSDK under the right list ("Executable Files", "Include Files", etc.) [smile]

For example, I had to manually add "C:\Program Files\Microsoft Platform SDK\Include" into my "Include Files" list.

##### Share on other sites
Quote:
Original post by common
Quote:
 Original post by CombatHammieThanks bubu, I completely forgot that GLUT is seperate.Nevertheless, it's just a side thing. GL.h IS on the machine (in the PSDK) folder.And no, it looks like classpath environment variables were NOT set automatically during the installation. So the question is what to do now.

After you've got glut.h being found what errors do you get? If it says you're missing gl.h or glu.h simply go to Tools->Options, then under the Projects and Solutions node click on VC++ Directories and then add the directories to the PSDK under the right list ("Executable Files", "Include Files", etc.) [smile]

For example, I had to manually add "C:\Program Files\Microsoft Platform SDK\Include" into my "Include Files" list.

I'll deal with glut later, right now I can't even compile anything with gl.h

I added the directories as needed. There is a file that has to be edited, I know for sure that that's the reason behind the problem. What are the files that have to be added? (opengl32.lib is one of them)

• 9
• 23
• 10
• 19