C++ programming software for mac.

Discussion in 'Mac Programming' started by shishir141989, Sep 15, 2013.

  1. macrumors newbie

    Joined:
    Sep 15, 2013
    #1
    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:
     
  2. macrumors 601

    Joined:
    Oct 14, 2008
    #2
    Why not Xcode?
     
  3. macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #3
    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.
     
  4. macrumors 603

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #4
    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.
     
  5. thread starter macrumors newbie

    Joined:
    Sep 15, 2013
    #5
    Thanks all :) btw still can't understand why they cant just make it simple :confused:
     
  6. macrumors 603

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #6
    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.)
     
  7. chrono1081, Sep 15, 2013
    Last edited: Sep 15, 2013

    macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #7
    ? 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.
     
  8. macrumors 601

    Joined:
    Oct 14, 2008
    #8
    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.
     
  9. macrumors regular

    Joined:
    Sep 15, 2009
    Location:
    Montreal, Canada
    #9
    ^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. ;)
     
  10. macrumors 603

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #10
    I mostly agree with this except masochists don't choose to program in C. They choose esolangs such as Piet or Whitespace.
     
  11. macrumors 604

    ravenvii

    Joined:
    Mar 17, 2004
    Location:
    Melenkurion Skyweir
    #11
    Or Python.

    *runs away*








    In all seriousness, if you are truly a masochist... program in Brain****.
     
  12. macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #12
    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.
     
  13. macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #13
    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)
     
  14. macrumors 603

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #14
    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.
     
  15. macrumors 603

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #15
    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.
     
  16. macrumors 68040

    Joined:
    Feb 2, 2008
    #16
    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.
     
  17. macrumors 603

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #17
    Surely somebody somewhere had to make the worlds first transistors and use them for the first time.
     
  18. macrumors 603

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #18
    Physicists and chemists, not programmers.
     
  19. macrumors 68020

    Krevnik

    Joined:
    Sep 8, 2003
    #19
    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.
     
  20. macrumors 6502

    Joined:
    Nov 27, 2007
    Location:
    Crestview, Fl
    #20
    I still do it that way! :)
     
  21. macrumors member

    proboscisjoe

    Joined:
    May 12, 2008
    #21
    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.
     
  22. subsonix, Sep 19, 2013
    Last edited: Sep 19, 2013

    macrumors 68040

    Joined:
    Feb 2, 2008
    #22
    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.
     
  23. macrumors member

    Joined:
    Feb 26, 2009
    Location:
    Cochabamba
    #23
    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)
     
  24. macrumors 6502a

    aaronvan

    Joined:
    Dec 21, 2011
    Location:
    I can see Puget Sound from here
    #24
    Gosh, that's nearly as bad as Perl.
     
  25. macrumors regular

    Joined:
    Oct 25, 2013
    #25
    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.
     

Share This Page