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

In summary, the conversation discusses the process of installing Eclipse 3.7.0 (Indigo) on a Mac for both Java and C++ development. The steps involved checking for necessary software, installing new software, creating a project, and building and running a simple program. The conversation ends with the speaker mentioning their previous experience with Eclipse and their plan to uninstall and reinstall with CDT.
  • #1
Saladsamurai
3,020
7
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:
#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:
**** 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:
Launch Failed. Binary Not Found.


I would love to get this going here. Thanks!
 
Technology news on Phys.org
  • #2
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.
 
  • #3
Thanks! This is what I am trying now.
 

1. Can Eclipse be used for C++ development on a Mac?

Yes, Eclipse can definitely be used for C++ development on a Mac. Eclipse is a cross-platform integrated development environment (IDE) that supports various programming languages, including C++. It can be easily installed and configured on a Mac for C++ development.

2. Is there a specific version of Eclipse that is recommended for C++ development on a Mac?

There is no specific version of Eclipse that is recommended for C++ development on a Mac. However, it is recommended to use the latest version of Eclipse to take advantage of the latest features and bug fixes.

3. Can we use Eclipse for C++ development on a Mac without any additional plugins or tools?

No, additional plugins or tools are required for C++ development on Eclipse. Eclipse does not come with built-in support for C++ development, so you will need to install a C++ development plugin such as CDT (C/C++ Development Tools) to use Eclipse for C++ development on a Mac.

4. How do we configure Eclipse for C++ development on a Mac?

To configure Eclipse for C++ development on a Mac, you will need to first install the C++ development plugin (CDT). Once the plugin is installed, you can create a new C++ project or import an existing one into Eclipse. You may also need to configure the build settings and include any necessary libraries or headers for your project.

5. Can we debug C++ code on Eclipse for Mac?

Yes, you can debug C++ code on Eclipse for Mac. Eclipse has a built-in debugger that supports C++ code. You can set breakpoints, step through your code, and inspect variables while debugging your C++ program on Eclipse for Mac.

Similar threads

  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
6
Views
3K
  • Computing and Technology
Replies
8
Views
2K
  • Programming and Computer Science
Replies
19
Views
3K
  • Computing and Technology
Replies
2
Views
2K
  • Computing and Technology
Replies
1
Views
2K
  • Programming and Computer Science
Replies
2
Views
19K
  • Programming and Computer Science
2
Replies
49
Views
10K
  • Programming and Computer Science
Replies
6
Views
4K
Replies
18
Views
5K
Back
Top