![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Feb 2005
Posts: 2
Rep Power: 0
![]() |
two errors, need help, openGL code
When using the code you download here:
http://nehe.gamedev.net/data/lessons/devc/lesson01.zip which uses openGL, why do I get the following errors when trying to run it? I'm using Dev-C++ compiler by the way. In function 'BOOL CreateGLWindow(char*, int, int, int, bool)'; line 153: 'CDS_FULLSCREEN' undeclared (first use this function) I copied and pasted the code correctly, so it's not a typo. thanks |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Feb 2005
Posts: 2
Rep Power: 0
![]() |
ack... ok, ok, well I figured out what the error was, but when fixing it, the compiler was allowed to proceed farther than it could last time which caused it to find MORE errors. The solution was that CDS_FULLSCREEN apparently is not defined in some compilers, so I had to define it myself like: #define CDS_FULLSCREEN 4
here are the errors I get: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x38):lesson1.cpp: undefined reference to `glViewport@16' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x45):lesson1.cpp: undefined reference to `glMatrixMode@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x4d):lesson1.cpp: undefined reference to `glLoadIdentity@0' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x84):lesson1.cpp: undefined reference to `gluPerspective@32' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x91):lesson1.cpp: undefined reference to `glMatrixMode@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x99):lesson1.cpp: undefined reference to `glLoadIdentity@0' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0xb7):lesson1.cpp: undefined reference to `glShadeModel@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0xd1):lesson1.cpp: undefined reference to `glClearColor@16' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0xe0):lesson1.cpp: undefined reference to `glClearDepth@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0xf0):lesson1.cpp: undefined reference to `glEnable@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x100):lesson1.cpp: undefined reference to `glDepthFunc@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x115):lesson1.cpp: undefined reference to `glHint@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x13b):lesson1.cpp: undefined reference to `glClear@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x143):lesson1.cpp: undefined reference to `glLoadIdentity@0' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x258):lesson1.cpp: undefined reference to `wglMakeCurrent@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x282):lesson1.cpp: undefined reference to `wglDeleteContext@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x854):lesson1.cpp: undefined reference to `ChoosePixelFormat@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x898):lesson1.cpp: undefined reference to `SetPixelFormat@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x8ce):lesson1.cpp: undefined reference to `wglCreateContext@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0x914):lesson1.cpp: undefined reference to `wglMakeCurrent@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccETaaaa.o(.text+0xc2f):lesson1.cpp: undefined reference to `SwapBuffers@4' |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Are you linking with the OpenGL libraries?
|
|
|
|
|
|
#4 |
|
Professional Programmer
|
doesn't look like it
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|