Eclipse + CDT + OpenGL How-To?

I googled around and i have yet to find a link that would resolve compile error:

#include <iostream>
#include <gl/glut.h>

int main(int argc, char ** argv)
{
	glutInit(&argc , argv);
	return 0; 
}

**** Incremental build of configuration Debug for project test ****

make -k all 
Building file: ../test.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -otest.o ../test.cpp
../test.cpp:9:4: warning: no newline at end of file
Finished building: ../test.cpp
 
Building target: test.exe
Invoking: GCC C++ Linker
g++ -otest.exe ./test.o
./test.o: In function `main':
/cygdrive/d/Projects Eclipse/test/Debug/../test.cpp:7: undefined reference to `_glutInit@8'
collect2: ld returned 1 exit status
make: *** [test.exe] Error 1
make: Target `all' not remade because of errors.
Build complete for project test
   

I set up Cygwin with gcc/gdb/make/automake/opengl and I use Eclipse as my editor/compiler. Program without OpenGL compiled, but not with GL.

Would someone please, provide a how-to step-by-step. many thank yous in advance – ak :confused:

FIGURED THIS OUT. in the gcc linker section of the project properties, enter “glut32” and “opengl32” as libraries, so the project knows what libs to link. eh…okay, c/c++/java i can do without switching IDEs.