MinGW with OpenGL

Started by
-1 comments, last by taesen00 16 years, 1 month ago
I'm trying to compile an OpenGL program using MinGW, but I'm not having much luck. The following is my output: C:\progs>g++ torus.cpp -lopengl32 -lglu32 -lglut32 -o torus.exe torus.cpp:13:1: warning: "M_PI" redefined In file included from torus.cpp:11: C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:58:1: warning: this is the location of the previous definition C:\DOCUME~1\AARONC~1.PA0\LOCALS~1\Temp/ccCedaaa.o:torus.cpp:(.text+0x1c): undefined reference to `__glutInitWithExit@12' C:\DOCUME~1\AARONC~1.PA0\LOCALS~1\Temp/ccCedaaa.o:torus.cpp:(.text+0x3d): undefined reference to `__glutCreateWindowWithExit@8' C:\DOCUME~1\AARONC~1.PA0\LOCALS~1\Temp/ccCedaaa.o:torus.cpp:(.text+0x5d): undefined reference to `__glutCreateMenuWithExit@8' collect2: ld returned 1 exit status C:\progs> I have the the following header files in c:\MinGW\include\GL gl.h gluax.h glext.h glu.h glui.h glut.h Any ideas one what to do? Thanks.

This topic is closed to new replies.

Advertisement