Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse does not find standard headers
Eclipse does not find standard headers [message #500723] Fri, 27 November 2009 12:58 Go to next message
No real name is currently offline No real name
Messages: 1
Registered: November 2009
Junior Member
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
Re: Eclipse does not find standard headers [message #500756 is a reply to message #500723] Sat, 28 November 2009 02:24 Go to previous messageGo to next message
Michael Mising name is currently offline Michael Mising name
Messages: 97
Registered: July 2009
Member
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:~>
Re: Eclipse does not find standard headers [message #502056 is a reply to message #500756] Fri, 04 December 2009 19:24 Go to previous message
Marc-Andre Laperle is currently offline Marc-Andre Laperle
Messages: 171
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
...
}
Previous Topic:Re: Linking Static Library
Next Topic:Specify active build configuration for headless build
Goto Forum:
  


Current Time: Wed Aug 27 07:12:15 EDT 2014

Powered by FUDForum. Page generated in 0.01820 seconds