Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

s1587

macrumors newbie
Original poster
Nov 16, 2007
14
0
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

macrumors 604
Oct 2, 2006
6,810
1,100
The Land of Hope and Glory
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.
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
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

macrumors newbie
Original poster
Nov 16, 2007
14
0
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

Moderator emeritus
Jun 15, 2000
7,958
7
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

macrumors 604
Oct 2, 2006
6,810
1,100
The Land of Hope and Glory
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

Suspended
Nov 25, 2005
17,980
5,566
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

macrumors newbie
Aug 30, 2007
9
0
Pittsburgh
Many compilers available on Windows command line

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

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
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

macrumors newbie
Aug 30, 2007
9
0
Pittsburgh
We are the problem, not MS

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

macrumors member
Feb 15, 2008
32
0
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 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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.