App wanted, for simple c++ programming, help please!

Discussion in 'Mac Programming' started by XheartcoreboyX, Sep 16, 2008.

  1. XheartcoreboyX macrumors 6502a


    Jul 3, 2007
    So, im having a c++ programming course in my college and need to get a good alternative for Borland Turbo c++, which is only for windows..

    What i will be using is (cout,cin,if, loops..) just simple things and i want to be able to load and run any application made with Turbo c++

    I tried xCode before, but it was so confusing and things didnt work as they did in turbo c++, pluse, it takes so much space.

    I hope someone can help with this, since its really not worth it to install windows and buy vmware fusion, just for Borland's turbo c++ ..

  2. Littleodie914 macrumors 68000


    Jun 9, 2004
    Rochester, NY
    Two options:

    1) Download Eclipse. It's a free C++ IDE that is actually in very good shape these days.

    2) Write the code in a text editor, and use the G++ compiler in the command line to compile your code files.
  3. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    I vote for option 2. Tying yourself to any IDE is asking for trouble (though at least Eclipse is cross-platform).

  4. kainjow Moderator emeritus


    Jun 15, 2000
    If Xcode takes up too much space, you could probably delete a lot of the files in /Developer but be careful. For example Applications, Documentation and Examples should be safe to delete.
  5. notjustjay macrumors 603


    Sep 19, 2003
    Canada, eh?
    Yeah, gcc is pretty much the worldwide standard, may as well learn on that.
  6. mobilehaathi macrumors G3


    Aug 19, 2008
    The Anthropocene
    I definitely vote #2.:)
  7. ChrisA macrumors G4

    Jan 5, 2006
    Redondo Beach, California
    I spend about 50 hours a week doing #2. Not much different than what I did 20 years ago. Unix is Unix be it Solaris, Mac OS or Linux. I try to remain cross platform by using GNU Automake, Autoconf and so on. But for a student project just use gcc on the command line. If that gets to be to much trouble then write a Makefile. If that gets out of hand then look at the GNU Autotools

    Where the IDEs are very useful is when you want to build a GUI application that is driven my a mouse and has a graphical user interface. Many of then come with drage and drop interface buildrs. But I don't do much of that. My stuff mostly runs in the background
  8. darkwing macrumors 65816

    Jan 6, 2004
    Just a little shortcut for you if you decide to go the command line route. You can put all your .cpp and .hpp files in one directory and compile them all with

    g++ -o appname *.cpp
    Very easy! Just use your favorite text editor, or even use XCode or Eclipse for its syntax highlighting and don't worry about projects or anything.
  9. Ti_Poussin macrumors regular


    May 6, 2005
    You should give xCode a real try, it's really painless and work pretty well. You can also, as other said, learn to use makefile to compile your stuff. That's really a nice thing to learn. If you pass by make file, take note that mac os x may have different path for some library or framework.

    But if your just beginning and make some basic coding without the use of dynamic library, makefile should be a quick and good way to learn (it can do much more, but may be tricky for beginner). xCode will simplify the task for bigger project, debugging purpose, integrating framework, etc

    here's a basic tutorial for makefile

    a more graphic one
    Note that the compiler you may want to use is g++ (for C++ code)

    making theses file in a C++ project in xcode (command line utility, C++ tools) will take care of makefile by himself and compile with just a click.

Share This Page