Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 8, 2012, 07:20 PM   #1
timebourne
macrumors newbie
 
Join Date: Sep 2012
Eclipse Juno: Error 127

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:
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:
Click image for larger version

Name:	Screen shot 2012-12-08 at 5.11.13 PM.png
Views:	261
Size:	38.3 KB
ID:	382404

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:
Click image for larger version

Name:	Screen shot 2012-12-08 at 5.22.37 PM.png
Views:	173
Size:	76.3 KB
ID:	382407
(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 by timebourne; Dec 8, 2012 at 07:26 PM.
timebourne is offline   0 Reply With Quote
Old Dec 9, 2012, 12:03 PM   #2
wrldwzrd89
macrumors G4
 
wrldwzrd89's Avatar
 
Join Date: Jun 2003
Location: Solon, OH
Quote:
Originally Posted by timebourne View Post
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:
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:
Attachment 382404

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:
Attachment 382407
(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!
http://stackoverflow.com/questions/3...make-error-127

That link suggests that Eclipse is having trouble finding something it needs. If you're using Xcode 4.3 or newer, you must manually install the command-line tools first. Older versions of Xcode come with the needed tools.

The other problem you may be running into is that command names may have changed. Apple tends to refactor things in Xcode fairly frequently, and uses symbolic links in /usr/bin to point to the real name of the tools. Make sure you're referencing the symbolic links, rather than the real tools in the Developer folder.
__________________
iMac Intel (Rev H, 27"), 1TB HDD, 16GB RAM, 10.8.4
wrldwzrd89 is offline   0 Reply With Quote
Old Dec 9, 2012, 01:51 PM   #3
timebourne
Thread Starter
macrumors newbie
 
Join Date: Sep 2012
Quote:
Originally Posted by wrldwzrd89 View Post
http://stackoverflow.com/questions/3...make-error-127

That link suggests that Eclipse is having trouble finding something it needs. If you're using Xcode 4.3 or newer, you must manually install the command-line tools first. Older versions of Xcode come with the needed tools.

The other problem you may be running into is that command names may have changed. Apple tends to refactor things in Xcode fairly frequently, and uses symbolic links in /usr/bin to point to the real name of the tools. Make sure you're referencing the symbolic links, rather than the real tools in the Developer folder.
Hmm, yeah I went through that thread but the comments were things that didn't really apply, or I didn't understand.

I have an older Xcode, Xcode 3. So if I understand correctly, my includes folders have the the real name of the tools, so I must find the libraries I need in /usr/bin and include THAT folder instead of the ones I currently have? (Here: Click image for larger version

Name:	Screen shot 2012-12-08 at 5.11.13 PM.png
Views:	98
Size:	38.3 KB
ID:	382508) Or rather, do I have to edit the Symbols tab?
(I apologize if I'm going in circles, I have a vague understanding of how this all works so I'm not entirely sure how everything correlates).

Last edited by timebourne; Dec 9, 2012 at 02:05 PM.
timebourne is offline   0 Reply With Quote
Old Dec 9, 2012, 03:16 PM   #4
wrldwzrd89
macrumors G4
 
wrldwzrd89's Avatar
 
Join Date: Jun 2003
Location: Solon, OH
Quote:
Originally Posted by timebourne View Post
Hmm, yeah I went through that thread but the comments were things that didn't really apply, or I didn't understand.

I have an older Xcode, Xcode 3. So if I understand correctly, my includes folders have the the real name of the tools, so I must find the libraries I need in /usr/bin and include THAT folder instead of the ones I currently have? (Here: Attachment 382508) Or rather, do I have to edit the Symbols tab?
(I apologize if I'm going in circles, I have a vague understanding of how this all works so I'm not entirely sure how everything correlates).
Yup. Your understanding is correct.

EDIT: Well, the names of the compiler and linker you need live in /usr/bin. The libraries themselves may live in different places, but with Xcode 3 symbolic links to most of them are in /usr/include.
__________________
iMac Intel (Rev H, 27"), 1TB HDD, 16GB RAM, 10.8.4
wrldwzrd89 is offline   0 Reply With Quote
Old Dec 10, 2012, 06:31 PM   #5
timebourne
Thread Starter
macrumors newbie
 
Join Date: Sep 2012
Quote:
Originally Posted by wrldwzrd89 View Post
Yup. Your understanding is correct.

EDIT: Well, the names of the compiler and linker you need live in /usr/bin. The libraries themselves may live in different places, but with Xcode 3 symbolic links to most of them are in /usr/include.
Click image for larger version

Name:	Screen shot 2012-12-09 at 3.57.13 PM.png
Views:	78
Size:	40.9 KB
ID:	382803

I added in /usr/bin and it still gave me the same message and /usr/include didn't exist so I went looking for something similar and I tried those and those didn't work. Hahaha this is kind of ridiculous.
timebourne is offline   0 Reply With Quote
Old Dec 10, 2012, 06:37 PM   #6
wrldwzrd89
macrumors G4
 
wrldwzrd89's Avatar
 
Join Date: Jun 2003
Location: Solon, OH
Quote:
Originally Posted by timebourne View Post
Attachment 382803

I added in /usr/bin and it still gave me the same message and /usr/include didn't exist so I went looking for something similar and I tried those and those didn't work. Hahaha this is kind of ridiculous.
Wow... well, shows you how different we are. Evidently you're still using Leopard, which I cannot even RUN on this Mac (it came with Snow Leopard). I am officially stumped.
__________________
iMac Intel (Rev H, 27"), 1TB HDD, 16GB RAM, 10.8.4
wrldwzrd89 is offline   0 Reply With Quote
Old Dec 10, 2012, 09:41 PM   #7
timebourne
Thread Starter
macrumors newbie
 
Join Date: Sep 2012
Quote:
Originally Posted by wrldwzrd89 View Post
Wow... well, shows you how different we are. Evidently you're still using Leopard, which I cannot even RUN on this Mac (it came with Snow Leopard). I am officially stumped.
I'm for sure running Snow Leopard: Name:  Screen shot 2012-12-10 at 7.37.41 PM.png
Views: 1205
Size:  33.4 KB

This is what my usr folder looks like:
Name:  Screen shot 2012-12-10 at 7.40.43 PM.png
Views: 1205
Size:  14.7 KB
timebourne is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
eclipse, error 127, juno, make: ***

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
How can I add 127.0.0.1 localhost to my etc/hosts file/ oxband Mac OS X 10.7 Lion 3 Jun 20, 2013 01:52 PM
Walmart Offering iPhone 5 for $127, Third-Generation iPad for $399 MacRumors MacRumors.com News Discussion 403 Jan 28, 2013 03:07 AM
Wal-Mart puts iPhone 5 on sale for $127; are iPhone sales dragging? richpuer Wasteland 2 Dec 28, 2012 09:19 AM

Forum Jump

All times are GMT -5. The time now is 11:54 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC