Author Topic: Sev needs help using Eclipse C++ IDE  (Read 1089 times)

stuffs crazy.


I was looking for an IDE that can be used on a mac and is for C/C++.


Best one I found was Eclipse's C++ IDE. Problem is this stuff is complicated. I'm new to using these kinds of things and my only past experience was using BlueJ to compile java.

Anybody here who is fluent in C++ want to tell me how to use this forgeter?

Managed to create a project and build it.

I keep getting the error, "Launch Failed: Binaries not found"

I assume this is because of a missing make file, but it's in there because I built the project.


If this doesn't work soon I'm switching to netbeans D:

loving amazing.

I need to be an apple developer to get the sufficient libraries to build and compile my code in Netbeans.

Does anybody have an IDE that works and doesn't sodomize me by making me download assloads of other stuff.?

Does Mac's version of Notepad not work for you?

Netbeans is nice but you have to Download an compiler

Netbeans is nice but you have to Download an compiler
Can't.

Does Mac's version of Notepad not work for you?
I need a compiler.

if you're willing to tell me how the forget to compile this stuff and run it that would be nice. Because it seems every loving tutorial for C++ on the internet uses Eclipse or Netbeans. Netbeans requires I download a compiler, the one for mac is Xcode, but I need to have some registered Apple Developer stuff thing to get it. forget you apple.

And Eclipse compiles binary in 32 bit but gcc 4.2 which is what came with Snow Leopard which is on my computer compiles it in 64 bit. Which obviously doesn't loving work. Tried adding linker flags like other people have suggested on multiple blogs and tried using a makefile somebody created and it never works. And half of the time it's hard to even understand what they are saying because of the fact their posts are a year old and for some reason the program looks different for me on certain menus which is ironic because obviously they've updated it but that means they haven't fixed any of the loving problems that were there a year ago. Nicely done.

loving A. It's 5 times harder for me to find a way to compile this stuff then to learn the actual language.

Anyone have a suggestion?
« Last Edit: December 31, 2010, 03:22:20 AM by SeventhSandwich »


Xcode can be found on the discs that come with the computer.

Xcode can be found on the discs that come with the computer.
Like Snow Leopard? Or what :P

I lost my actual cd's, so all I really have is the snow leopard disk


Like Snow Leopard? Or what :P

I lost my actual cd's, so all I really have is the snow leopard disk
As far as I know, you can only get it with the second disc that comes with the computer. But try the Snow Leopard one anyway. It might be in extras.


Wait...


...

GCC comes with Snow Leopard right? As a compiler?...

Oh stuff.

I have no C++ experience, but I know for a fact that Eclipse IDEs are the best out there and they are very simple to set up a project with.

Did you actually try googling the error? That is what you should always do when you get an error in any programming language and don't understand the exception.
http://stackoverflow.com/questions/1668447/launch-failed-binary-not-found-snow-leopard-and-eclipse-c-c-ide-issue
Quote
Not a question, I've just scoured the internet in search of a solution for this problem and thought I'd share it with the good folks of SO. I'll put it in plain terms so that it's accessible to newbs. :) (Apologies if this is the wrong place -- just trying to be helpful.)

This issue occurs with almost any user OS X Snow Leopard who tries to use the Eclipse C/C++ IDE, but is particularly annoying for the people (like me) who were using the Eclipse C/C++ IDE in Leopard, and were unable to work with Eclipse anymore when they upgraded. The issue occurs When users go to build/compile/link their software. They get the following error:

Launch Failed. Binary Not Found.

Further, the "binaries" branch in the project window on the left is simply nonexistent.

THE PROBLEM: is that GCC 4.2 (the GNU Compiler Collection) that comes with Snow Leopard compiles binaries in 64-bit by default. Unfortunately, the linker that Eclipse uses does not understand 64-bit binaries; it reads 32-bit binaries. There may be other issues here, but in short, they culminate in no binary being generated, at least not one that Eclipse can read, which translates into Eclipse not finding the binaries. Hence the error.

One solution is to add an -arch i686 flag when making the file, but manually making the file every time is annoying. Luckily for us, Snow Leopard also comes with GCC 4.0, which compiles in 32 bits by default. So one solution is merely to link this as the default compiler. This is the way I did it.

THE SOLUTION: The GCCs are in /usr/bin, which is normally a hidden folder, so you can't see it in the Finder unless you explicitly tell the system that you want to see hidden folders. Anyway, what you want to do is go to the /usr/bin folder and delete the path that links the GCC command with GCC 4.2 and add a path that links the GCC command with GCC 4.0. In other words, when you or Eclipse try to access GCC, we want the command to go to the compiler that builds in 32 bits by default, so that the linker can read the files; we do not want it to go to the compiler that compiles in 64 bits.

The best way to do this is to go to Applications/Utilities, and select the app called Terminal. A text prompt should come up. It should say something like "(Computer Name):~ (Username)$ " (with a space for you user input at the end). The way to accomplish the tasks above is to enter the following commands, entering each one in sequence VERBATIM, and pressing enter after each individual line.

cd /usr/bin
rm cc gcc c++ g++
ln -s gcc-4.0 cc
ln -s gcc-4.0 gcc
ln -s c++-4.0 c++
ln -s g++-4.0 g++
Like me, you will probably get an error that tells you you don't have permission to access these files. If so, try the following commands instead:

cd /usr/bin
sudo rm cc gcc c++ g++
sudo ln -s gcc-4.0 cc
sudo ln -s gcc-4.0 gcc
sudo ln -s c++-4.0 c++
sudo ln -s g++-4.0 g++
Sudo may prompt you for a password. If you've never used sudo before, try just pressing enter. If that doesn't work, try the password for your main admin account.

OTHER POSSIBLE SOLUTIONS You may be able to enter build variables into Eclipse. I tried this, but I don't know enough about it. If you want to feel it out, the flag you will probably need is -arch i686. In earnest, GCC-4.0 worked for me all this time, and I don't see any reason to switch now. There may be a way to alter the default for the compiler itself, but once again, I don't know enough about it.

Hope this has been helpful and informative. Good coding!

I have no C++ experience, but I know for a fact that Eclipse IDEs are the best out there and they are very simple to set up a project with.

Did you actually try googling the error? That is what you should always do when you get an error in any programming language and don't understand the exception.
http://stackoverflow.com/questions/1668447/launch-failed-binary-not-found-snow-leopard-and-eclipse-c-c-ide-issue
Tried it, yet it didn't work.

I now think I may not have GCC installed.

Does anybody know how to install it? It uses a subversion client which I don't have. I do have a SVN client I can use on my mac, will that work?

And if so, where do I check it out to...?