Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

shishir141989

macrumors newbie
Original poster
Sep 15, 2013
2
0
I recently bought a mac pro and am looking for some good C++ programming software that i can use on it can anyone help me out? :confused:
 

ChrisA

macrumors G5
Jan 5, 2006
12,557
1,669
Redondo Beach, California
I recently bought a mac pro and am looking for some good C++ programming software that i can use on it can anyone help me out? :confused:

Apple's x-code. It is available for free from Apple

If you don't like x-code just download gcc and use terminal windows and vi like "everyone" did 20 years back.

If you want a graphic development environment and you ned to be cross platform look at "eclipse". x-code is tied to Apple but Eclipse runs on every platform.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,557
6,057
No matter what you ultimately decide to use, the first step is definitely going to be going to the Mac App Store and download Xcode. It's free.

You could do everything in Xcode yourself, but if you're the kind of person who prefers to go without an IDE then you'll want to launch Xcode, then go into the Xcode menu at the top of the screen, pick Preferences from the drop down, then pick the "Downloads" tab and download the Command Line Tools. This will install all the compilers and linkers and what not so that you can use whatever text editor to write your code in and then build and run from the command line.

Edit: I strongly discourage you from using Eclipse. It is without a doubt, by and far, the worst IDE I've ever had the displeasure of using.
 
  • Like
Reactions: Madd the Sane

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,557
6,057
Thanks all :) btw still can't understand why they cant just make it simple :confused:

What part of "Download Xcode" isn't simple?

In the past, Xcode was included as an optional install from the OS X install CD. Since Apple has gone digital and moved OS upgrades to the App Store, they also moved Xcode to the App Store. I'd say this is as simple as ever, if not more simple now that you don't have to dig up your install CD if you didn't install Xcode when you installed OS X.

Programming on Windows is definitely harder. You have numerous options to choose from, each with their own set of pros and cons.

Some (most?) distros of Linux might be easier than OS X, given that the tools are often included with the OS.

Though there are many parts of programming that I would agree are excessively complicated, getting an IDE on OS X is definitely not one of them. (I guess Apple could have a developer folder be part of the standard OS X set up and have Xcode always there... most users wouldn't ever need it though, so it'd basically just be causing needless bloat in the OS.)
 

chrono1081

macrumors G3
Jan 26, 2008
8,451
4,149
Isla Nublar
Thanks all :) btw still can't understand why they cant just make it simple :confused:

? Xcode is very simple.

To start a C++ project do this:

1. Open XCode.
2. Click "Create new Project".
3. Click "Application" OSX on the left side of the screen, and then click "Command Line Tool" on the right.
4. Click "Next" and then enter a Product Name, Organization Name, and Company Identifier. You can make whatever you want up for these three. Choose "C++" under "Type" and I would suggest turning off Automatic Reference Counting.
5. Choose where you want to save your project and click Next (maybe its Finish I forget).

Once your new project opens choose "main.cpp" on the right hand side and you'll see some template code in the left with Hello World in it. Type your code and hit "Run.

In the top right under "View" you'll see three boxes, clicking them will give you different panel options. Make sure the middle one is clicked so you can see the result of your code.


EDIT: Ok I see all those steps haha. Its actually really simple whenever you use it for a little bit. It has a lot of great tools that you'll be able to take advantage of later on.
 
Last edited:

leman

macrumors Core
Oct 14, 2008
19,177
19,023
Thanks all :) btw still can't understand why they cant just make it simple :confused:

Well, welcome to the C world, where API specification and implementation are two different entities and you have to mess around with headers, libraries, symbols, name mangling and other horrible stuff ;) Its already as simple as it gets. An alternative is to roll your own makefile and such.
 

Mikey7c8

macrumors regular
Sep 15, 2009
185
3
Montreal, Canada
^Agree. You've decided to program in C so are obviously a masochist; stop complaining about the install process as it's probably the least painful thing you're about to do. ;)
 
  • Like
Reactions: jaduff46

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,557
6,057
^Agree. You've decided to program in C so are obviously a masochist; stop complaining about the install process as it's probably the least painful thing you're about to do. ;)

I mostly agree with this except masochists don't choose to program in C. They choose esolangs such as Piet or Whitespace.
 

ChrisA

macrumors G5
Jan 5, 2006
12,557
1,669
Redondo Beach, California
I mostly agree with this except masochists don't choose to program in C. They choose esolangs such as Piet or Whitespace.

No. Real masochists had Altair or Imsai computers (remember those and the 8080 CPU?) They had a row of toggle switches on the front panel. We toggled in the ones and zeros for the data and address bus then pressed the "load" button, incremented the address in binary, toggled in the next data byte, hit "load" and continued like that one byte at a time. All because ROM was expensive.

Yes they had ROM in those days but the true masochists preferred the switches to spending the $200 or so for a ROM card. (back when $200 was two weeks pay)
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,557
6,057
No. Real masochists had Altair or Imsai computers (remember those and the 8080 CPU?) They had a row of toggle switches on the front panel. We toggled in the ones and zeros for the data and address bus then pressed the "load" button, incremented the address in binary, toggled in the next data byte, hit "load" and continued like that one byte at a time. All because ROM was expensive.

Yes they had ROM in those days but the true masochists preferred the switches to spending the $200 or so for a ROM card. (back when $200 was two weeks pay)

That does sound pretty aweful. I think I have something worst: masochist programmers have to n dope and p dope their own semiconductors to assemble their transistors which they then use to hardware programs. They don't use breadboards or sodder, either.

There, my imagination is tapped, I can't think of anything worse.

Also, regarding brain****, I'm pretty sure Whitespace and Piet are even worse.
 

firewood

macrumors G3
Jul 29, 2003
8,107
1,345
Silicon Valley
I think I have something worst: ....

Except that never happened.

Whereas I knew people who actually had those computers with front panel lights and switches for loading programs in binary. For instance, an Altair is the computer on which Micro Soft got started with their first product, Basic.

Further back in time, Cmdr. Grace Hopper and other programmers in her era played with relays and plugboards, not transistors.
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
Except that never happened.

Whereas I knew people who actually had those computers with front panel lights and switches for loading programs in binary. For instance, an Altair is the computer on which Micro Soft got started with their first product, Basic.

Didn't both the Altair and Imsai have terminal options though, hard to see what use a Basic interpreter is if you have no keyboard and screen. DEC PDP-11 etc did have them afaik.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,557
6,057
Except that never happened.

Whereas I knew people who actually had those computers with front panel lights and switches for loading programs in binary. For instance, an Altair is the computer on which Micro Soft got started with their first product, Basic.

Further back in time, Cmdr. Grace Hopper and other programmers in her era played with relays and plugboards, not transistors.

Surely somebody somewhere had to make the worlds first transistors and use them for the first time.
 

Krevnik

macrumors 601
Sep 8, 2003
4,100
1,309
Physicists and chemists, not programmers.

Exactly. Not to mention a transistor doesn't make a computer, nor can it be 'programmed'.

You go from the researchers, to the hardware engineers integrating it into new computer design, to the software engineers interacting with the prototypes.
 

proboscisjoe

macrumors member
May 12, 2008
41
0
Xcode is not the best IDE for non-Cocoa Programming

I personally prefer not to use Xcode for C++ programming. I use Eclipse for C++ and Xcode for Objective-C/Cocoa Libraries.

Although Xcode is a beautiful IDE, but it's really designed for developers to take advantage of the Cocoa libraries and other platform-specific documentation. In addition, the compiler for C++ source code that ships with Xcode is buggy and you will find yourself downloading an alternative such as g++ (a command-line compiler) anyway.

Eclipse can be downloaded via the link bearing its name.
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
In addition, the compiler for C++ source code that ships with Xcode is buggy and you will find yourself downloading an alternative such as g++ (a command-line compiler) anyway.

Complete nonsense, Clang was the first compiler to offer full C++11 support, not to mention that it produces much better error messages and have faster compile times. I recently saw a talk by Stroustrup from 2012 on C++11 style, the compiler that was mentioned on his slides, Clang.
 
Last edited:

aratio

macrumors member
Feb 26, 2009
38
0
Cochabamba
Netbeans or QtCreator?

I like Netbeans and QtCreator.

Netbeans is by far simpler than Eclipse and IMHO, as powerful as the latter.

http://www.netbeans.org


QtCreator is an IDE written in Qt to implement Qt/QML applications or C++ standalone apps too.

http://download.qt-project.org/offi...1.1/qt-mac-opensource-5.1.1-clang-offline.dmg

Also, try to use a C++11 compliant compiler. Clang 3.1 and g++ 4.7+ implement almost all the C++11 standard features.

You can install them using macports (http://www.macports.org)
 

ekiro

macrumors regular
Oct 25, 2013
136
0
I recently bought a mac pro and am looking for some good C++ programming software that i can use on it can anyone help me out? :confused:

You looking for something with a built in compiler?

I would recommend using Sublime 2 or another robust, light weight editor. Then save your code on a Linux box to compile it on.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.