Alternative to Xcode?

Discussion in 'Mac Programming' started by s1587, Mar 2, 2008.

  1. macrumors newbie

    Joined:
    Nov 16, 2007
    #1
    Hi!
    Im using Leopard with Xcode 2.5. Simple Hello world programs refuse to work. They give me a statement like "No launchable executable present at path" . Ive followed the steps suggested on this forum by someone with a similiar query right from New Project. Now,im tired. I want to know if there's some other software i could use to work with C and C++.
    Is there anyway i can work with them via the terminal?
     
  2. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Use Xcode 3.

    What exactly are the steps you are going through?

    You should do this :

    Open Xcode.
    File Menu > New Project.
    Scroll down till you see Command Line Utility
    Expand the list and click on C++ Tool.
    Click next.
    Type in the name of project.
    Click Finish.
    Run Menu > Console.
    Then click Build and Go on the project window.
    Job done.
     
  3. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3
    If you've installed XCode then the command line compilers are installed. Just type gcc...
     
  4. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #4
    Of course there's an alternative. Unlike in Microsoft Windows, you're not forced to use some bloated, complex, heavyweight IDE. Just edit hello.c in the text editor of your choice, for example vi, emacs, or even TextEdit.app.

    Then in the terminal:

    gcc -g -o hello hello.c

    and if all goes well, just type ./hello. End of story.
     
  5. thread starter macrumors newbie

    Joined:
    Nov 16, 2007
    #5
    Thanks!
    Ill try loading Xcode 3.0 now.
    Once it is installed, do i have to do something else or is gcc automatically recognized by the shell?
     
  6. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #6
    If you have 2.5 installed GCC is already installed, ready to go from Terminal. It'll be the same with v3.
     
  7. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #7
    The reason I said to use 3 is that it has some rather nice fixes and features that Xcode 2.5 is lacking, but as already mentioned a simple text editor and the terminal are a perfectly acceptable solution.
     
  8. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    #8
    If "simple 'hello world' programs refuse to work", then you are doing something wrong. I suggest you will spend much less energy figuring out what you are doing wrong then finding an alternative IDE. And hoping that you will get better error messages.

    With the error message "No launchable executable present at path" (and telling us where this happens would be helpful), you should first figure out: Which path? Then: What is at this path? Then: Why is it not an executable?
     
  9. macrumors newbie

    Joined:
    Aug 30, 2007
    Location:
    Pittsburgh
    #9
    Many compilers available on Windows command line

    Untrue. Microsoft Visual Studio compiler can be used from the command line, and, if memory serves, said compiler was available free (as in, "free beer") for download even before the express version with a pared-down IDE became available. You can also run (separately purchased) Intel compilers from command line in all of GNU/Linux, Windows, and OS X. Oh yeah, command line versions of gcc are available for Windows in both mingw and cygwin varieties.
     
  10. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #10
    I was speaking in broad strokes. You're right there is always cygwin, which should be the first thing you should install if you install Windows. I don't count the DOS command prompt as it isn't particularly usable. The point is that Microsoft, MS development shops, and university programming courses that teach on Windows, are heavily oriented towards overly complex IDEs and VS in particular. I've found that many young students just coming into the workforce have never worked apart from one (and only one, typically).
     
  11. macrumors newbie

    Joined:
    Aug 30, 2007
    Location:
    Pittsburgh
    #11
    We are the problem, not MS

    Maybe you meant to speak broadly, but I confess I was offended that you put the blame for the use of big/bloaty/complex IDEs on Windows (you said we're "forced").

    First, big IDEs aren't unique to Windows, e.g., Xcode, Netbeans, Eclipse, Matlab, Mathematica, etc.

    Second, the culprit is us, or rather, IDEs wouldn't succeed without a market for them. Basically, the problem is the mindset to find a silver bullet, all-encompassing solution. An IDE is like a cosy, warm blanket in which you feel safe in the apparent completeness of it.

    The problem is, we're not smart enough to ever produce a complete IDE, or one that solves all needs. There's always something missing, or our needs differ from those of the designer, and the cosy blanket mentality discourages actively controlling/modifying one's tools.

    Basically, an IDE is like Microsoft Office for programming, and is a kind of polar opposite of the Unix software tools philosophy, where each program only does one thing, but does it well. We need modular, extensible tools; I'm sick of wasting energy fighting some failed programming paradigm's attempt to enforce its world view while ignoring the rest of the universe.

    Yes, I'm digressing to the battles over languages, but I feel that the issues relating to programming tools and prog. languages are both coupled and similar.
     
  12. macrumors member

    Joined:
    Feb 15, 2008
    #12

    Well pretty well said except Xcode works on Mac only which was one of the
    good qualities as it did not have to be everything to everybody. then mac in their overall wisdom decided to depreciate the Java Bridge and WebObjects which were a couple of brilliant things that Apple couldn't market properly.
    so trade the enterprise for and freaking bull***** phone. makes sense to me.

    Netbeans and the rest all try to be everything to everbody. This industry needs a good well founded IDE with the qualities of Xcode/WebObjects.

    read all the forums on eclipse/ netbeans etc and you may be bringing back a IBM 3030

    sick programming world out there right now. Everything seems to be "Open Hackers" no continuity or common sense.

    Oh well the games will work
     
  13. thread starter macrumors newbie

    Joined:
    Nov 16, 2007

Share This Page