With CDT+MinGW cann i in Eclipse write usual C++ programm. Now i want to in Eclipse OpenGL programm with glut write, how should i do?

by the way, jemand sagt mir, soll ich in Eclipse fuer Linker ein Parameter des libs geben, leider vertehe ich das nicht.

hm…first you should consider that the preferred language in this forum is english.

about your problem: i don’t know how eclipse works, but i guess it starts an external compiler? in that case, and if the compiler is gcc for instance, a command to compile an opengl app would look like

gcc -o gl_test -lGL -lGLU -lglut

the last flag tells the compiler that the glut library should be used. does eclipse display a command like the above when compiling? if yes, you should check if the glut flag is present. if not, there’ll probably a makefile which you should check for the appropriate flags

Jorney, the best approach is to download the GLUT examples. I found the FreeGLUT implementation and examples to work well for this. You’d compile FreeGLUT or install the binary, and then work on getting any of the examples to work.

All it really takes is setting up the header search path to find the OpenGL headers, FreeGLUT or GLUT, and then setting the link path and libraries, all via the project settings. The gcc (mingw) compiler is invoked with the “Compile” menu option. And if you use the automatic makefile option for your project, the system will simply build all C++ files in the project directory and link them with the specified libraries.

Once you get an example working, it should be very clear which parts of that you need to keep or emulate for your app.