c++ complier? big problem... need help...

Posted:
in Mac Software edited January 2014
i recently bought a g5 mac. anyways, when school starts up i am taking a programming class, unfortunatly the school cant see the advantages of mac so all the programming will be done on windows comps. i need a mac c++ compiler similar to microsoft visual c++, and i need it to be able to make the same programs as the ones we are making in school.



can i be helped or should i start building a crappy win comp so i can pass?

Comments

  • Reply 1 of 4
    zfmtzfmt Posts: 53member
    they dont have to be exes they just have to be... what ever macs executable is
  • Reply 2 of 4
    kickahakickaha Posts: 8,760member
    All Macs come with the Xcode development environment, if you want a nice GUI IDE. If all you need is to compile C++ code, Xcode uses gcc on the back-end, and gcc can also be used directly on the command line. Auld skool, mon.



    Unless the prof requires that a) you program *WINDOWS*, or that b) they be able to compile your projects themselves in Visual C++, it'll do you fine.



    FWIW, I'm finishing up my PhD in CS, and I use gcc on the command line almost exclusively.
  • Reply 3 of 4
    gongon Posts: 2,437member
    When I last did C++, VC++ would not run some of my code that ran fine with other compilers. It had to do with details of syntax in templates. Maybe in this time Microsoft has fixed VC++ to obey the standard... Yeah, right.



    Anyway, what I'm saying is as long as you don't have to do Windows specific coding (Windows API, MFC, .Net, ...) and the programming class is a basic one, you'll also be able to compile code in VC++ you developed using GCC or another compiler.
  • Reply 4 of 4
    pbg4 dudepbg4 dude Posts: 1,611member
    Just to be clear, you need to install the developer tools in order to use gcc (it's part of the install). Your best bet would be to sign up for a free online ADC account at developer.apple.com so you can download the latest developer tools release. Last I checked it was XCode 2.1 which was a 750MB download because they package some version of WebObjects for developers with it, which I believe is a trial version.
Sign In or Register to comment.