PDA

View Full Version : Alternative to Xcode?




s1587
Mar 2, 2008, 12:11 PM
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?



Cromulent
Mar 2, 2008, 12:21 PM
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.

robbieduncan
Mar 2, 2008, 12:21 PM
If you've installed XCode then the command line compilers are installed. Just type gcc...

yeroen
Mar 2, 2008, 12:31 PM
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.

s1587
Mar 2, 2008, 12:34 PM
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?

kainjow
Mar 2, 2008, 12:43 PM
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?

If you have 2.5 installed GCC is already installed, ready to go from Terminal. It'll be the same with v3.

Cromulent
Mar 2, 2008, 12:45 PM
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?

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.

gnasher729
Mar 2, 2008, 04:23 PM
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?

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?

friarlicious
Mar 2, 2008, 04:38 PM
Unlike in Microsoft Windows, you're not forced to use some bloated, complex, heavyweight IDE.

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.

yeroen
Mar 2, 2008, 05:00 PM
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.

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).

friarlicious
Mar 2, 2008, 08:26 PM
I was speaking in broad strokes.

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.

roamy
Mar 2, 2008, 11:47 PM
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.


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 ************* 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

s1587
Mar 6, 2008, 09:44 AM
Thanks a lot for all the help! It worked!