Jump to content
  • Advertisement
Sign in to follow this  
Katocan

WTF?

This topic is 4536 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!