I am working throught the OpenGL Superbible’s AUX section…it says I have to…
“To build this program, you need to set your compiler and link options to build a Win32 console (or
text-based) application. You will need to link to the AUX library glaux.lib and the OpenGL import library
opengl32.lib. See your compiler’s documentation for individual instructions on building console
applications.”
I setup a new project with the options:
-Platform: Win32
-Target Model: Console
-Node: .c
*nothing else selected
I now insert this Code
"
#include <windows.h> // Standard Window #include <conio.h> // Console I/O functions
#include <gl\gl.h> // OpenGL functions
#include <gl\glaux.h> // AUX Library
void main(void)
{
// These are the AUX functions to set up the window
auxInitDisplayMode(AUX_SINGLE | AUX_RGBA);
auxInitPosition(100,100,250,250);
auxInitWindow(“My first OpenGL Program”);
// These are the OpenGL functions that do something in the window
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
// Stop and wait for a keypress
cprintf("Press any key to close the Window
");
getch();
}
"
When I try and build the project I get a Linking error
" Fatal: Unable to open file ‘filename.def’ "
Anybody know what am I doing wrong?
Many thanks
HD