Sign in to follow this  

Very New Newbie

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been reading/doing tutorials lately. I've been coding for a little while, and just recently wanted to start doing some OpenGL work. This question comes from an OpenGL tutorial, but I'm pretty sure it isn't a specific OpenGL topic. In the very first NeHe tutorial (I'm sure at least some of you are familiar with it), I am instructed to include a file called "windows.h". I've done search after search and so far, all I can find is two things. The first, a lot of articles telling me just how important this file is. Second, some code. I copy/pasted the code in, but then it just tells me an include in that file can't be found, and so on. So, I'm tired of searching and reading. Can someone just please help me out. A link? Anything. I'm frustrated with how much work I did on that tutorial only to be foiled in line two. Thanks. Cheers. Matthew

Share this post


Link to post
Share on other sites
How are you writing it?

#include <windows.h>

or

#include "windows.h"

If you are using the latter then it is trying to find the include in the local project directory. If you are using the former it should be looking in the main includes folder for your compiler.
You must use:

#include <windows.h>

It really should be there...

If nothing, heres a link to the header file I uploaded from my version of MSVC++ (I don't think doing this infringing on copyright. If so, PM me)
Windows.h

Share this post


Link to post
Share on other sites
I tried downloading those .exes. The last one (PSDK-x86.exe) works, but the other two say they are not a valid win32 file when I DL them and double-click. Any suggestions on that? Thanks for the help guys.

edit: I also tried copy/pasting the windows.h source that was linked above, but when I compile that, it tells me that windef.h doesn't exist. So, if I keep going like this, will it just keep telling me I need more .h files? Shouldn't these files just come with my computer? Anyway, thanks for all the help guys.

Share this post


Link to post
Share on other sites
I got windows.h, added the directory where it is, but now I'm getting 24 unresolved external symbols. the .cpp compiles fine, but I can't build the whole project. I think I'll also post in the NeHe forum, since I copied the code directly from his site and it doesn't seem to work. Cheers.

Matthew

Share this post


Link to post
Share on other sites
Unresolved symbols usually mean you forgot to include a library... have you included opengl32.lib and glu32.lib? If not you should do that in your project options. Not sure in which field though... haven't used visualc++ in a while...

Share this post


Link to post
Share on other sites
"OpenGL32.lib"
"GLu32.lib"
"GLaux.lib"

those are the three things i was told (by the tut) to add in. i also added the library directory where it can find those things. the parts that it is saying are unresolved are function inside of source. i'm really confused. thanks for the help.

matthew

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this