I'm very close to throwing something at a wall right now. I've spent hours trying to get eclipse c/c++ to work on my computer. I have a mac that runs Snow Leopard, and I installed Eclipse Juno (I already have xCode, but I need to use eclipse for instructional purposes). So first, it kept telling me that gcc and g++ could not be found in PATH. So I went online and tried to find answers, and then I tried to resolve it using the .bash_profile file and other such ideas that took research and then trying multiple different inputs. Everyone seems to have their own little way to resolve it but it doesn't work specifically for me. I finally resolved it by reinstalled the CDT individually from the Juno package. That error stopped. Then I tried writing a simple hello world program given code here:
So I know my syntax is right, I'm not using iostream.h or anything.
It told me cout, std, etc could not be resolved.
I found out that in the includes folder of the project it was missing a bunch of basic libraries that are needed. So I ended up going to project preferences, c/c++ general, paths and symbols, and in includes(with the folder icon) I added in the following files:
After closing and opening eclipse, the errors went away. So I cheered happily and tried to run it, and then it gave me the error: File was not launched. Binary not found. So then I went "wtf?" and I went back to google and found out that when you run it, it doesn't build first. So then I went to project -> build all. It built and then i tried to run it, and now I'm currently stuck here with no guidance from my research capabilities:
(oh and in case this means anything, no, I have not edited the makefile, I was just trying to check it out to see if it would maybe clue me into something...)
If you want more information, I'm not very good with eclipse(and I know a good amount about c++(i've been working with it for a year or two now) but not at a highly technical level) so if you can, please include instructions on how to find this additional information, if not I can figure it out as well but I'm hard pressed for time.
I'd greatly apreciate it if you could help me out, this is a huge headache and I can see a lot of people are suffering through this as well, so I think it would help a lot of people as well!
Code:
#include <iostream>
using namespace std;
int main () {
cout << "Hello world" << endl;
return 0;
}
So I know my syntax is right, I'm not using iostream.h or anything.
It told me cout, std, etc could not be resolved.
I found out that in the includes folder of the project it was missing a bunch of basic libraries that are needed. So I ended up going to project preferences, c/c++ general, paths and symbols, and in includes(with the folder icon) I added in the following files:
After closing and opening eclipse, the errors went away. So I cheered happily and tried to run it, and then it gave me the error: File was not launched. Binary not found. So then I went "wtf?" and I went back to google and found out that when you run it, it doesn't build first. So then I went to project -> build all. It built and then i tried to run it, and now I'm currently stuck here with no guidance from my research capabilities:
(oh and in case this means anything, no, I have not edited the makefile, I was just trying to check it out to see if it would maybe clue me into something...)
If you want more information, I'm not very good with eclipse(and I know a good amount about c++(i've been working with it for a year or two now) but not at a highly technical level) so if you can, please include instructions on how to find this additional information, if not I can figure it out as well but I'm hard pressed for time.
I'd greatly apreciate it if you could help me out, this is a huge headache and I can see a lot of people are suffering through this as well, so I think it would help a lot of people as well!
Last edited: