|
|
Re: Eclipse does not find standard headers [message #502056 is a reply to message #500756] |
Sat, 05 December 2009 00:24 |
Marc-André Laperle Messages: 256 Registered: July 2009 |
Senior Member |
|
|
Quote: |
Hi,
I downloaded the eclipse CDT package and tried to get a simple Hello-World running. Unfortunally this is not working.
When compiling, I get the following warning: "../main.cpp:1:20: warning: iostream: No such file or directory". So iostream is not found.
The strange thing about this is that when I go to the Debug directory of the project and manually "make" it, everything works fine and I get the desired binary.
Why is that not working inside eclipse? Is there anything I have to setup? Did not found anything about this issue (I'm using Linux).
Have a nice friday,
HorstHagedorn
|
In the Project Explorer view, under your project, do you see a Includes tree with /usr/include, /usr/lib/gcc... ? If not, maybe you could try another project and make sure you select the correct toolchain in the project wizard. If it still doesn't work, try adding the paths manually in the project properties > C/C++ General > Path and Symbols, Includes. My list look like this on Ubuntu 9.10:
/usr/local/include
/usr/lib/gcc/i486-linux-gnu/4.4.1/include
/usr/lib/gcc/i486-linux-gnu/4.4.1/include-fixed
/usr/include
You might need to browse your filesystem a bit to find the equivalent.
Quote: | Hi
About the same here with Ganymede:
Errormsg: 'glGenBuffers' was not declared in this scope.
I tried in another project and added:
#include <GL/glext.h>
glGenBuffers(1,&nVBO);
same also with:
glBindBuffer etc.
I'm using the latest openGL
3.2 Nvidia driver 32bit on openSuse 11.2 ( GeForce 8800 GTS 512MB )
glext is included. I checked within glext.h and found it.
What else could I try?
Michael
michael@23-194-pool:~> glewinfo | grep glGenBuffer
glGenBuffers: OK
glGenBuffersARB: OK
michael@2-194-pool:~>
|
It's easier to use glew.h instead of gl.h, glext.h, etc.
#include <GL/glew.h>
int main()
{
// window setup ...
...
GLenum err = glewInit();
if (GLEW_OK != err)
{
fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
}
// do usual OpenGL stuff
...
}
|
|
|
Powered by
FUDForum. Page generated in 0.05030 seconds