From: Jon K. <jon...@gm...> - 2011-07-28 12:53:51
|
Hi All, I'm having a heck of a time trying to get FreeGlut up and running on my Mac using Eclipse CDT and I was hoping I could get some help. I downloaded the tar for 2.6.0 and had to follow the instructions here in order for it to properly extract and make without errors. http://lookass.ch/?id=4&area=art&art=221 tar -xzf freeglut-2.6.0.tar.gz cd freeglut-2.6.0 ./autogen.sh CPPFLAGS="-I/usr/X11R6/include" ./configure --prefix="${PWD}/../" make make install This created two directories, once called include and one called lib. In the include there is the GL folder with freeglut_ext.h, freeglut_std.h, freeglut.h and glut.h. In the lib folder there is libglut.3.dylib, libglut.a, libglut.dylib and libglut.la. So naturally in Eclipse I pointed the include directory to the include folder and added the lib folder to library paths. This allowed me to include freeglut.h properly but when i went to build it would error since it couldn't find GL/gl.h and GL/glu.h. Since I'm on a mac, those files are part of the OpenGL framework on the OS so i modified the freeglut_std.h so it reads: #if defined(__APPLE__) #include <OpenGL/gl.h> #include <OpenGL/glu.h> #else #include <GL/gl.h> #include <GL/glu.h> #endif This fixed the include build error but now I have the following errors which seems like the linker is not finding the libraries properly. Can anyone help me out with what to do next? make all Building target: CPPHelloWorld Invoking: MacOS X C++ Linker g++ -L/OpenGL/FreeGlut_2.6.0_Release/lib -framework OpenGL -framework GLUT -framework Cocoa -o "CPPHelloWorld" ./src/CPPHelloWorld.o Undefined symbols: "_glutInitContextProfile", referenced from: Initialize(int, char**)in CPPHelloWorld.o "_glutSetOption", referenced from: Initialize(int, char**)in CPPHelloWorld.o "_glutInitContextFlags", referenced from: Initialize(int, char**)in CPPHelloWorld.o "_glutInitContextVersion", referenced from: Initialize(int, char**)in CPPHelloWorld.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [CPPHelloWorld] Error 1 |