I'm working on the opengl tutorial, but my stystem is unable to find this header?
where can i get this?
I'm working on the opengl tutorial, but my stystem is unable to find this header?
where can i get this?
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
stdafx is some piece of junk VC++ automatically creates to "manage" pre-compiled headers.
It never contains anything worth looking at
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
it is an include file under the opengl tutorial.
code referenced from link
If it is not valid, then why is it listed in the tutorial?Code:/* Pre-processor directives*/ #include "stdafx.h" #include <windows.h>
I'm confused.
It does work with out it, so i'm really confused now.
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
Have you tried using #include <stdafx.h>? I might find it there.
SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
I say what I say, I mean what I mean.
IDE: emacs + make + gcc and proud of it.
Try changing it to
// #include "stdafx.h"
Like I said, it's a windows compiler "optimisation" thing.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
stdafx.h is just a pregenerated file that contains commonly used headers. It contains nothing itself apart from other #includes. It's a nice feature when using MFC because you don't have to remember which headers to include, but if I'm not using MFC I usually just remove all references to it.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
now I'm having (unresolved externals) with the robot program.
is it posted without a required header?
i'm assuming from these errors the program is not a self contained program. Do I have to create the prototypes or the entire class? looking at the program it looks like it should work asis due to the functions are declared prior to main. I'm not sure what is wrong. could it be the function calls are passing the wrong type of data? Sorry if these question are remedial, but I've never seen open gl or windows programming before.link
Last edited by xviddivxoggmp3; 11-08-2003 at 12:39 PM.
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
Unresolved externals are linker errors, not compiler errors. You most likely need to like the OpenGL libraries.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
You also need to link with the opengl library
How you do this depends on your compiler
With gcc for example, you would do something like
gcc prog.c -lopengl
With an IDE, there's usually a project setting to specify names/locations of additional libraries
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I've read that this is how you link the library, but I do not have this option on my compiler. I'm using
Microsoft Visual C++.NET Version 7.0.9466
Does anybody know how to do this on my compiler.
details quoted from linkAfter you have created a new Win32 Application (NOT a console application) in Visual C++, you will need to link the OpenGL libraries. In Visual C++ go to Project, Settings, and then click on the LINK tab. Under "Object/Library Modules" at the beginning of the line (before kernel32.lib) add OpenGL32.lib GLu32.lib and GLaux.lib. Once you've done this click on OK. You're now ready to write an OpenGL Windows program.
I created the win32 application, I assumed it needed to be an empty project. When I click on the project menu I get
(1) add class
(2) add resource
(3) add new item
(4) add existing item
(4) new folder
(5) add web reference
(6) set as startup project
I feel I'm in the wrong location.
Last edited by xviddivxoggmp3; 11-09-2003 at 09:44 PM.
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
On VC++ .NET, do the following:
Go to the solution explorer (the pane that has all your source files listed; use View->Solution Explorer if you don't see it).
You should see a tree view with your solution. The root of the tree is the solution, and the thing directly under the solution is your project (typically, if your solution contains only one project, it will have the same name as the solution itself).
Right click on the project, and select the "Properties" option from the menu that pops up.
In the new window that appears, click on "linker" then "input". Make sure, at the top, you select Configuration: All Configurations. Add your libraries (separated with spaces if there are multiple libraries) to the box saying "Additional Dependencies"
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
Cat,
Thanks for the help. I will try it at my next work break.
I saw that when tinkering, but was unsure what it meant.
The documentation provided by microsoft for the compiler wasn't clear on how to do it. I'm assuming you are fluent with the MSVC++.NET compiler. Do you have any recommendations on books to read on all the compiler options?
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
No, I just fought with it until I learned how it worked.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
Thanks Cat.
It works.
You opened a new world of programming for me.
I feel OpenGL is going to be a fun experience.
I feel a bit smarter now.
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
As another note, if you need different libraries for different configurations -- for example, if you need a debug version of the library in debug mode, and a release ver in release -- then set the libraries for each configuration separately, of course.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.