简体   繁体   中英

Running C++ with Eclipse on Mac OSX Lion

So I'm running Mac OSX Lion and I recently installed Eclipse IDE for Java Developers. I recently started programming in C++ and I wanted to be able to use Eclipse as my main IDE. So first thing I did was install the Command Line told from Xcode in order to be able to use the g++ compiler. I then went into eclipse -> help -> install new software and entered the following link: http://download.eclipse.org/tools/cdt/releases/indigo .

I installed all of the Main Features and the Optional Features. I then created a new C++ Hello World Project and built it. However when I right click on the binary file, there in no "Run as local C/C++ Application" option. There's actually no run option at all.

I downloaded and installed the Eclipse IDE for C/C++ Developers and created a new hello world project just to test. This one seemed to work fine. Why does it work in the c/c++ IDE but not in the java IDE with the CDT installed along-side?

What is the view name - is it "Package Explorer" or "Project Explorer"? The first one is explicitly for Java and does not support some C++ tooling features. Switch to C/C++ perspective and try again.

So after a lot of toying around, I came up with a somewhat annoying solution. Because it worked with the C/C++ IDE, I just decided to look at everything that was installed in that version and make sure it was installed in the Java IDE. For some odd reason it worked. I add already installed all the main features but I guess it wasn't enough.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM