Compiling glew on Eclipse in Linux
I have downloaded Eclipse for c++ developers (with CDT). I also installed freeglut3 and glew libraries via terminal. I added -lglut -lGLEW and -lGL to linker. The problem is, that while in IDE, some methods are marked red as if not found. Pressing build, compiles code, but when I run it, black screen is showed, but nothing is rendered, as if methods that should be imported by GLEW do not exist. If I go to header, it opens valid glew.h file with all method declarations.
This has happened in both VMWare virtual machine with Ubuntu and dedicated Linux Mint netbook, so it might be that I'm missing something.
[EDIT] Code was taken from here: OpenGL linux tutorial.
Red marked methods are just the sign of eclipse scanner not working correctly . If your code compiles and link without warnings and errors there is nothing to worry about. You should focus on your code as you sure have a logic error in your gl code (camera not pointing towards the scene for example).
链接地址: http://www.djcxy.com/p/61792.html