Is NetBeans enough for C/C++?

Discussion in 'Mac Programming' started by iamvincent, Apr 27, 2010.

  1. iamvincent macrumors member

    Joined:
    Feb 6, 2010
    #1
    Hi all, I am using C/C++ to carry out some statistics analysis, I wonder if Xcode is kinda overkilling, since I'm not using C/C++ to do fancy stuff or other applications, my need for computation is huge though(i'm a phd in statistics and need to analysis lots of compuationally instensive data). So do you think NetBeans would be enough for me? Does it have any apparent jump or drawbacks compare to Xcode in terms of C/C++? ThX in advance
     
  2. mongrol macrumors regular

    Joined:
    Jul 16, 2007
    #2
    They are both IDE's which use GCC at the backend so the end result, which is your compiled C++ executable, will be the same. While I've never used Netbeans for development it looks fairly similar to XCode but does have the advantage that it's cross platform (being Java based) so any project files produced with it can be taken and edited on other operating systems. That being said I use XCode everyday for C++ and it's very good.
     
  3. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #3
    I will, as always, be the curmudgeon and say that it sounds like any IDE may be overkill. Get a nice text editor and compile with gcc/g++, if things get too complex, use make.

    When you are ready to move your code to a Linux system that doesn't have netneans installed, you won't be lost and sad. You'll compile your code and get churning.

    -Lee
     
  4. iamvincent thread starter macrumors member

    Joined:
    Feb 6, 2010
    #4
    thank you mongrol. so do you mean that xcode is not cross platform, then if i compliled the code using xcode, it wouldn't run on a pc?



     
  5. iamvincent thread starter macrumors member

    Joined:
    Feb 6, 2010
    #5
    Thanks Lee. I agree with you on that IDE overkills. Any suggestion on which editor is nice and how to compile using gcc without xcode/netbeans? Is it like just running everything using terminal?

     
  6. RaceTripper macrumors 68030

    Joined:
    May 29, 2007
    #6
    XCode is Mac OS X only. You would need a cross compiler to build a Windows app from C++ source on the Mac. I don't think Netbeans nor XCode provide that capability.

    Makes me think of the old Metrowerks days. God I loved getting those new releases. There was just something really cool about it. It was an event.
     
  7. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #7
    I think vim is a great editor, but it takes some getting used to. It is a terminal-based editor that is keyboard-only. I have a hard time recommending GUI editors due to a lack of familiarity. I can parrot smultron, textmate, and tetwrangler, which others on this forum have recommended, but I have not used them myself.

    To compile and run a single-source file C++ program:
    g++ -o myProg myProg.cpp
    ./myProg

    the more source files you have the more involved this gets, but it's not too bad and I think it's a skill worth having.

    -Lee
     
  8. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #8
    I also like that make has builtin rules even when there's no makefile, so this should also work:
    Code:
    make myProg
     
  9. chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #9
    I use netbeans for C++ all the time. I like netbeans :)
     
  10. ipponrg macrumors 6502

    Joined:
    Oct 15, 2008
    #10
    IMO learn how to create Makefiles when compiling. They make a world of difference. It's also good practice too.

    Sometimes on my Mac, I use VI (which is the console variant of VIM). It's good to develop these skills because sometimes while working you may not have access to a GUI editor.

    Yeah it's pretty much like running everything using terminal. You can open multiple terminals up if needed
     
  11. mrbash macrumors 6502

    Joined:
    Aug 10, 2008
    #11
    Although I am an ardent fan of Netbeans, the poster recommending you learn 'make' is right. It's the closest thing to the lowest common denominator. 'Make' is pretty ugly and fragile, but you are guaranteed that most platforms will have it.

    In terms of editors, there are no guarantees. The ubiquitous 'vi' is missing on Windows, but VS comes with make.
     

Share This Page