Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 15th, 2005, 1:51 PM   #1
infernosnow
Newbie
 
Join Date: Feb 2005
Posts: 2
Rep Power: 0 infernosnow is on a distinguished road
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
infernosnow is offline   Reply With Quote
Old Feb 15th, 2005, 1:59 PM   #2
infernosnow
Newbie
 
Join Date: Feb 2005
Posts: 2
Rep Power: 0 infernosnow is on a distinguished road
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'
infernosnow is offline   Reply With Quote
Old Feb 16th, 2005, 7:57 AM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Are you linking with the OpenGL libraries?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 16th, 2005, 10:14 AM   #4
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
doesn't look like it
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:53 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC