PDA

View Full Version : XCode - Build and Go Button - Inactive




TejasMehrotra
Dec 14, 2009, 08:30 AM
Hi,

I am new to programming on Mac. I installed XCode 3.1.3 and was trying to write a C++ program 'Hello World' but I was unable to compile the program.

I wrote the program but the 'Build and Go' button is inactive. What am I suppose to do to activate the button or what am I suppose to do to compile a c++ program?

Enclosed: Pictures which might help you to understand my problem better.

http://i46.tinypic.com/21mgggy.png

http://i48.tinypic.com/250nmgw.png

http://i47.tinypic.com/23svrxy.png

Thanks a lot! :-)

Tejas.



SRossi
Dec 14, 2009, 08:43 AM
Did you create a new project or just a new file?

Because in Xcode you must create a project for it run. Just create a new project by going File -> New Project and selecting C++ command line application.

This will create all the files needed for Xcode to run the app.

Stephen

TejasMehrotra
Dec 14, 2009, 08:55 AM
Thanks a lot Stephan. I really appreciate your help.

It worked! :-)

Although, it said "Succeeded" but now the problem is that where do I see the output from?

Sorry to bug you with my super duper "rookie" questions.

Thanks a lot! :-)

Tejas.

SRossi
Dec 14, 2009, 09:28 AM
To solve this you need to open Xcode's preferences by going Xcode -> Preferences, then navigate to "Debugging" and next to "On Start" use the drop down box to select "Show Console". Apply the changes and build and run your app again.

And no question is a rookie question, everyone starts somewhere.

Stephen

TejasMehrotra
Dec 14, 2009, 10:36 AM
Thanks a lot Stephan. :)

Tejas.

Detrius
Dec 14, 2009, 11:56 AM
And no question is a rookie question, everyone starts somewhere.

That doesn't make it not a rookie question. It does, however, mean that it's not a stupid question. :cool:

TaylorGSmith
Feb 21, 2012, 07:02 PM
Did you create a new project or just a new file?

Because in Xcode you must create a project for it run. Just create a new project by going File -> New Project and selecting C++ command line application.

This will create all the files needed for Xcode to run the app.

Stephen

So I'm having the exact same problem and I don't have the "C++ command line application" option... What am I to do? Went through:

File -> New project
Framework & Library -> "STL C++ Library"

"Run/Build" is inactive...
There are no errors, there is a check mark next to it indicating what I assume is that it is error-free...

I'm at my wit's end. In Eclipse, I merely have to save to run my program, but it seems Xcode requires more protocol. What am I to do?

PS - I'm running Xcode 3.2.6

ScoobyMcDoo
Feb 21, 2012, 09:58 PM
Don't choose Framework and Library, instead choose Applications.