Skip to main content

Posts

Showing posts with the label NeHe

NeHe lesson 40 fix (at least for my setup)

I was trying to compile the Dev-Cpp example of the nehe.gamedev.ne t Lesson 40 , and I was always ending up with: NeHeGL.o:NeHeGL.cpp: undefined reference to `ChoosePixelFormat@8' NeHeGL.o:NeHeGL.cpp: undefined reference to `SetPixelFormat@12' NeHeGL.o:NeHeGL.cpp: undefined reference to `SwapBuffers@4' collect2: ld returned 1 exit status *** [MinGW/Lesson40.exe] Error 1 I had spend hours thinking the problem was with my Dev-Cpp setup, but after googling onChoosePixelFormat, one of the functions on with I was having troubles, I found at msdn that this function is a gdi32 function, and the .dev file was missing this on the linker entry I have checked and my Dev-Cpp setup had the libgdi32.a in the same folder that I also had libopengl32.a and libglu32.a so, I made the assumption that this lib should also be linked during the compilation. I did some tests just adding the -lgdi32 on the command line compilation and SUCESS! So I was just needing to make Dev-Cpp also generates t...