Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 15, 2013, 11:38 AM   #1
shishir141989
macrumors newbie
 
Join Date: Sep 2013
C++ programming software for mac.

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?
shishir141989 is offline   0 Reply With Quote
Old Sep 15, 2013, 11:52 AM   #2
leman
macrumors 68040
 
Join Date: Oct 2008
Why not Xcode?
leman is offline   0 Reply With Quote
Old Sep 15, 2013, 12:21 PM   #3
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by shishir141989 View Post
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?
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.
ChrisA is offline   0 Reply With Quote
Old Sep 15, 2013, 12:25 PM   #4
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
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.
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Including the ones paired with other Macs on your network.
ArtOfWarfare is offline   0 Reply With Quote
Old Sep 15, 2013, 12:38 PM   #5
shishir141989
Thread Starter
macrumors newbie
 
Join Date: Sep 2013
Thanks all btw still can't understand why they cant just make it simple
shishir141989 is offline   0 Reply With Quote
Old Sep 15, 2013, 01:04 PM   #6
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by shishir141989 View Post
Thanks all btw still can't understand why they cant just make it simple
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.)
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Including the ones paired with other Macs on your network.
ArtOfWarfare is offline   4 Reply With Quote
Old Sep 15, 2013, 01:08 PM   #7
chrono1081
macrumors 604
 
chrono1081's Avatar
 
Join Date: Jan 2008
Location: Isla Nublar
Quote:
Originally Posted by shishir141989 View Post
Thanks all btw still can't understand why they cant just make it simple
? 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.
__________________
Mac Pro (2010): 3.33Ghz Intel Xeon (6 core) - 24 GB RAM - NVidia Quadro k5000
Macbook Air (2010): 2.13 Ghz Intel Core 2 Duo - 4GB RAM

Last edited by chrono1081; Sep 15, 2013 at 01:30 PM.
chrono1081 is offline   1 Reply With Quote
Old Sep 15, 2013, 03:34 PM   #8
leman
macrumors 68040
 
Join Date: Oct 2008
Quote:
Originally Posted by shishir141989 View Post
Thanks all btw still can't understand why they cant just make it simple
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.
leman is offline   1 Reply With Quote
Old Sep 16, 2013, 07:02 PM   #9
Mikey7c8
macrumors regular
 
Join Date: Sep 2009
Location: 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.
Mikey7c8 is offline   6 Reply With Quote
Old Sep 16, 2013, 09:39 PM   #10
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by Mikey7c8 View Post
^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.
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Including the ones paired with other Macs on your network.
ArtOfWarfare is offline   1 Reply With Quote
Old Sep 16, 2013, 11:21 PM   #11
ravenvii
macrumors 604
 
ravenvii's Avatar
 
Join Date: Mar 2004
Location: Melenkurion Skyweir
Quote:
Originally Posted by ArtOfWarfare View Post
I mostly agree with this except masochists don't choose to program in C. They choose esolangs such as Piet or Whitespace.
Or Python.

*runs away*








In all seriousness, if you are truly a masochist... program in Brain****.
__________________
59 6F 75 20 73 70 6F 6F 6E 79 20 62 61 72 64 21
ravenvii is offline   1 Reply With Quote
Old Sep 17, 2013, 12:09 AM   #12
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by shishir141989 View Post
Thanks all btw still can't understand why they cant just make it simple
How could it be simpler. Go to app store click on xcode icon. It's free.

It's a free app in the app store.
ChrisA is offline   0 Reply With Quote
Old Sep 17, 2013, 12:22 AM   #13
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by ArtOfWarfare View Post
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)
ChrisA is offline   0 Reply With Quote
Old Sep 17, 2013, 05:17 AM   #14
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by ChrisA View Post
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.
ArtOfWarfare is offline   0 Reply With Quote
Old Sep 17, 2013, 07:42 PM   #15
firewood
macrumors 603
 
Join Date: Jul 2003
Location: Silicon Valley
Quote:
Originally Posted by ArtOfWarfare View Post
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.
firewood is offline   0 Reply With Quote
Old Sep 17, 2013, 07:56 PM   #16
subsonix
macrumors 68030
 
Join Date: Feb 2008
Quote:
Originally Posted by firewood View Post
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.
subsonix is offline   0 Reply With Quote
Old Sep 17, 2013, 09:24 PM   #17
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by firewood View Post
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.
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Including the ones paired with other Macs on your network.
ArtOfWarfare is offline   0 Reply With Quote
Old Sep 19, 2013, 11:49 AM   #18
firewood
macrumors 603
 
Join Date: Jul 2003
Location: Silicon Valley
Quote:
Originally Posted by ArtOfWarfare View Post
Surely somebody somewhere had to make the worlds first transistors and use them for the first time.
Physicists and chemists, not programmers.
firewood is offline   0 Reply With Quote
Old Sep 19, 2013, 01:29 PM   #19
Krevnik
macrumors 68020
 
Krevnik's Avatar
 
Join Date: Sep 2003
Quote:
Originally Posted by firewood View Post
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.
__________________
iMac 2013 27", 13" rMBP, iPad 4, iPhone 5s
Krevnik is offline   0 Reply With Quote
Old Sep 19, 2013, 02:02 PM   #20
Big Dave
macrumors 6502
 
Join Date: Nov 2007
Location: Crestview, Fl
Quote:
Originally Posted by ChrisA View Post
If you don't like x-code just download gcc and use terminal windows and vi like "everyone" did 20 years back.
I still do it that way!
Big Dave is offline   1 Reply With Quote
Old Sep 19, 2013, 03:21 PM   #21
proboscisjoe
macrumors member
 
Join Date: May 2008
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.
proboscisjoe is offline   0 Reply With Quote
Old Sep 19, 2013, 09:16 PM   #22
subsonix
macrumors 68030
 
Join Date: Feb 2008
Quote:
Originally Posted by proboscisjoe View Post
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 by subsonix; Sep 19, 2013 at 09:23 PM.
subsonix is offline   3 Reply With Quote
Old Sep 23, 2013, 04:19 PM   #23
aratio
macrumors member
 
Join Date: Feb 2009
Location: 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/offic...ng-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)
aratio is offline   0 Reply With Quote
Old Oct 21, 2013, 04:07 PM   #24
aaronvan
macrumors 6502
 
Join Date: Dec 2011
Quote:
Originally Posted by ravenvii View Post
In all seriousness, if you are truly a masochist... program in Brain****.
Gosh, that's nearly as bad as Perl.
__________________
Italy had warfare, murder and bloodshed but produced Michelangelo, Leonardo da Vinci and the Renaissance. Switzerland had 500 years of peace and democracy and what did that produce? The cuckoo clock.
aaronvan is offline   0 Reply With Quote
Old Oct 26, 2013, 12:06 AM   #25
ekiro
Banned
 
Join Date: Oct 2013
Quote:
Originally Posted by shishir141989 View Post
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?
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.
ekiro is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Mac programming should be more like iOS programming. moonman239 Mac Programming 13 Feb 17, 2014 01:37 PM
Partition size for Win 8.1 64-bit and programming software Snookerman Windows, Linux & Others on the Mac 2 Jan 24, 2014 10:37 AM
Programming on a Mac ThunderBow Mac Programming 5 Mar 13, 2013 03:25 AM

Forum Jump

All times are GMT -5. The time now is 04:11 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC