Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Eclipse and C++ (Mac): Can we get this working here?

  1. Dec 28, 2011 #1
    So I installed Eclipse 3.7.0 (Indigo) for my Mac (Snow Leopard OS). I initially installed the "Java Only" version. That works fine. I then decided I wanted to consolidate to one IDE for both Java and C++ if possible. So, here is what I did:

    1) Checked to make sure I have gcc, g++, gdb installed on my machine: I do.

    2) Opened Eclipse and went to Help -> Install New Software... ->Work with: Indigo - http://download.eclipse.org/releases/indigo (from the dropdown).

    3) I selected from the 'Programming Languages' Dropdown:
    C/C++ development tools, C/C++ development tools SDK, CDT Visual C++ Support.

    4) I let the stuff install. It seemed to go well.
    ********

    Next I tried to do the simple Hello World Program:

    Open Eclipse and then:

    1) New -> Project -> C/C++ -> C++ Project

    2) Selected 'Empty Project' and named the Project 'HelloWorldProject'

    3) Let Eclipse change my perspective to the 'C/C++ Perspective'

    4) Right Click HelloWorldProject -> New -> Source File

    5) Typed into source file:
    Code (Text):

    #include <iostream>
    using namespace std;

    int main() {

        cout << "Hello World" << endl;
        return 0;
       
    }

     
    6) With the Editor still activated, press CMD + B in order to Build the Project

    In the Console Window in Eclipse I get the message:
    Code (Text):

    **** Build of configuration Debug for project HelloWorldProject ****

    Nothing to build for project HelloWorldProject
     
    Not sure what this means. If I try to run it, I get an error, as expected:

    Code (Text):
    Launch Failed. Binary Not Found.

    I would love to get this going here. Thanks!
     
  2. jcsd
  3. Dec 28, 2011 #2

    I like Serena

    User Avatar
    Homework Helper

    Once, I wrestled similarly with Eclipse.
    Finally, my solution was to uninstall Eclipse and install Eclipse with CDT from scratch.
    I got that to work.
     
  4. Dec 28, 2011 #3
    Thanks! This is what I am trying now.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Eclipse and C++ (Mac): Can we get this working here?
Loading...