c++ on OS X?

This is a discussion on c++ on OS X? within the C++ Programming forums, part of the General Programming Boards category; I dual-boot OS X and XP and I'm curious. Is there a recommended compiler for OS X aside from xcode? ...

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    c++ on OS X?

    I dual-boot OS X and XP and I'm curious. Is there a recommended compiler for OS X aside from xcode? I've attempted to use xcode and I don't really care for it at all. I use Dev C++ on Xp and I wondered if there isn't anything similar for OS X?

    Thanks!

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    Quote Originally Posted by Nectarios View Post
    I dual-boot OS X and XP and I'm curious. Is there a recommended compiler for OS X aside from xcode? I've attempted to use xcode and I don't really care for it at all. I use Dev C++ on Xp and I wondered if there isn't anything similar for OS X?

    Thanks!
    xcode is not a compiler.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,506
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    6
    Thanks for the replies! I'm new to c++ and didn't realize that xcode is not a compiler. All I knew was that it confused me! Anyway I appreciate the input and I hope you all have a nice holiday.

  5. #5
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    Dev C++ isn't a compiler either.
    Both are in fact editors, which may be able to call compilers.
    Same for codeblocks

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    As far as I know, Mac OS X comes with gcc in the distribution, which is a good compiler for both C and C++ (using gcc and g++ respectively to invoke the compiler).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Registered User
    Join Date
    Oct 2006
    Posts
    2,370
    NetBeans IDE is actually really nice. very feature-rich without being too complicated, and significantly more stable than Dev-C++. it runs on java, is sponsored by Sun, and will run on just about any platform that can run java. I use it on windows with mingw and on linux, and it works great for everything I've used it for. it has built-in connectors for multiple database systems (MSSQL, and MySql to name a couple), so you can browse your databases while developing applications that use them. I've only just scratched the surface of its capabilities in my own use, but it has already far exceeded my expectations.

  8. #8
    Registered User
    Join Date
    Jan 2008
    Posts
    70
    I would recommend Code::Blocks as an IDE and GCC as its compiler. I would also recommend that you stop using dev-c++, maybe use Code::Blocks on both mac and windows.

    edit: So to do that you would want to install GCC first (if it isn't already installed). Then when you install Code::Blocks it will find it (hopefully) and everything will work out.

  9. #9
    Registered User
    Join Date
    Dec 2008
    Posts
    6
    Im actually having a hard time understanding the programs you all have suggested. I normally consider myself computer savvy but now I'm feeling really inadequate hahah. In all of these programs I can write my code in the editor but I can't figure out how to compile. It's true that I have less experience with os x...I hope that this is a safe place to discuss this without being flamed.

    I only want to learn folks! any help is appreciated.

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,660
    Quote Originally Posted by Nectarios
    In all of these programs I can write my code in the editor but I can't figure out how to compile.
    The ways range from running the compiler from a command prompt to pressing a button in a graphical user interface that invokes the compiler (or using a menu option, keyboard shortcut, or using a batch file to run the command line commands... or perhaps a proper build tool like make). It depends on your tools and the development environment that you want to make of them.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  11. #11
    Registered User
    Join Date
    Feb 2003
    Posts
    595
    Quote Originally Posted by Drac View Post
    I would also recommend that you stop using dev-c++, maybe use Code::Blocks on both mac and windows.
    Just out of curiousity why do you recommend against Dev-C++?


    PS: I've been very happy with Code::Blocks (in Linux) for almost a year now. But up until a couple of years ago I was using Dev-C++ in Windows & it seemed OK.
    Last edited by R.Stiltskin; 12-24-2008 at 08:13 AM.

  12. #12
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,660
    Quote Originally Posted by R.Stiltskin
    Just out of curiousity why do you recommend against Dev-C++?
    It is no longer being maintained.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Detecting if OS is Windows???
    By Ktulu in forum Windows Programming
    Replies: 2
    Last Post: 11-19-2006, 01:49 AM
  2. a simple OS
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 06-06-2004, 10:47 PM
  3. Linux OS to Windows OS code
    By sw9830 in forum C Programming
    Replies: 2
    Last Post: 02-28-2003, 02:11 PM
  4. C++ Datatypes and OS Datatypes :: C++
    By kuphryn in forum Windows Programming
    Replies: 1
    Last Post: 12-07-2002, 01:06 PM
  5. How do they compile code for an OS ?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 49
    Last Post: 03-27-2002, 11:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21