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

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

  1. macrumors 6502a

    XheartcoreboyX

    Joined:
    Jul 3, 2007
    #1
    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++ ..

    thanks!
     
  2. macrumors 68000

    Littleodie914

    Joined:
    Jun 9, 2004
    Location:
    Rochester, NY
    #2
    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. macrumors 68040

    lee1210

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

    -Lee
     
  4. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    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. macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #5
    Yeah, gcc is pretty much the worldwide standard, may as well learn on that.
     
  6. macrumors 603

    mobilehaathi

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

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

    Joined:
    Jan 6, 2004
    #8
    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

    Code:
    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. macrumors regular

    Ti_Poussin

    Joined:
    May 6, 2005
    #9
    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
    http://mrbook.org/tutorials/make/

    a more graphic one
    http://www.eng.hawaii.edu/Tutor/Make/
    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