Skip to main content
gamedev.net
🔒 Locked

WTF?

Started by Katocan 3 replies 1.2k views
Original Post
Katocan
Katocan
I downloaded the source of lesson 3 and got a heap load of errors, I'm using Dev C++. Can anyone tell me why I'm getting these errors please? Heres the Compile Log: Compiler: Default compiler Executing g++.exe... g++.exe "C:\Documents and Settings\Administrator\Desktop\lesson03\lesson03\Lesson3.cpp" -o "C:\Documents and Settings\Administrator\Desktop\lesson03\lesson03\Lesson3.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x31):Lesson3.cpp: undefined reference to glViewport@16' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x40):Lesson3.cpp: undefined reference to glMatrixMode@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x48):Lesson3.cpp: undefined reference to glLoadIdentity@0' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x76):Lesson3.cpp: undefined reference to gluPerspective@32' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x85):Lesson3.cpp: undefined reference to glMatrixMode@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x8d):Lesson3.cpp: undefined reference to glLoadIdentity@0' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0xa2):Lesson3.cpp: undefined reference to glShadeModel@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0xcd):Lesson3.cpp: undefined reference to glClearColor@16' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0xda):Lesson3.cpp: undefined reference to glClearDepth@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0xe9):Lesson3.cpp: undefined reference to glEnable@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0xf8):Lesson3.cpp: undefined reference to glDepthFunc@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x10f):Lesson3.cpp: undefined reference to glHint@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x12c):Lesson3.cpp: undefined reference to glClear@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x134):Lesson3.cpp: undefined reference to glLoadIdentity@0' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x153):Lesson3.cpp: undefined reference to glTranslatef@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x162):Lesson3.cpp: undefined reference to glBegin@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x184):Lesson3.cpp: undefined reference to glColor3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x1a6):Lesson3.cpp: undefined reference to glVertex3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x1c8):Lesson3.cpp: undefined reference to glColor3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x1ea):Lesson3.cpp: undefined reference to glVertex3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x20c):Lesson3.cpp: undefined reference to glColor3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x22e):Lesson3.cpp: undefined reference to glVertex3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x236):Lesson3.cpp: undefined reference to glEnd@0' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x255):Lesson3.cpp: undefined reference to glTranslatef@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x277):Lesson3.cpp: undefined reference to glColor3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x286):Lesson3.cpp: undefined reference to glBegin@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x2a8):Lesson3.cpp: undefined reference to glVertex3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x2ca):Lesson3.cpp: undefined reference to glVertex3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x2ec):Lesson3.cpp: undefined reference to glVertex3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x30e):Lesson3.cpp: undefined reference to glVertex3f@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x316):Lesson3.cpp: undefined reference to glEnd@0' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x374):Lesson3.cpp: undefined reference to wglMakeCurrent@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x3af):Lesson3.cpp: undefined reference to wglDeleteContext@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x854):Lesson3.cpp: undefined reference to ChoosePixelFormat@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x8b8):Lesson3.cpp: undefined reference to SetPixelFormat@12' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x907):Lesson3.cpp: undefined reference to wglCreateContext@4' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0x969):Lesson3.cpp: undefined reference to wglMakeCurrent@8' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccYlbaaa.o(.text+0xca7):Lesson3.cpp: undefined reference to SwapBuffers@4' collect2: ld returned 1 exit status Execution terminated
Scet
Scet
Looks like you forgot to link to opengl32.a or you tried to compile the .cpp file by itself.

You did download the Dev-C++ version right? Plus always compile the whole project, not the .cpp file.

I haven't run into problems with the Dev-C++ projects, but I'll download 3 and see what's going on.

Edit: Compiles just fine, except I had to remove the glaux.h include.
eSCHEn
eSCHEn
Go to your linker options using 'Project > Project Options > Parameters Tab > Linker Box' and make sure you have the following included:

-lopengl32
-lglu32

That should sort it out.
--
Cheers,
Darren Clark
Katocan
Katocan
aha works fine when you open the .dev instead of the .cpp file :D, Thanks for help peeps! :)
eSCHEn
eSCHEn
No problems. Happy coding and make some games!
--
Cheers,
Darren Clark

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.