Tell me more x
, there is a new speed test available. Give it a try, leave feedback!
dslreports logo
    All Forums Hot Topics Gallery
spc
Search Topic:
uniqs
12494
share rss forum feed


Bubba_T
Fast Faisil Strikes Again
Premium
join:2001-09-22
Columbus, IN

Compile and run C program in Xcode 3.1.2

Click for full size
Hey guys, just messing around in Xcode and trying to get my super simple C program to run, but I can't figure out how. Can you take a look at my screen and tell me what I need to do to get this program to run? I've Googled for the past 15 minutes and can't find anything. The program compiled with no errors, but how do I run it?
--
He must have been an admiral a sultan or a king, and to his praises we shall always sing. Look what he has done for us he's filled us up with cheer! Lord bless Charlie Mops, the man who invented beer.


Thinkdiff
Premium,MVM
join:2001-08-07
Bronx, NY
kudos:11

1 edit
Did you setup the project to create a command-line program or application?

If it's an application, you need to create an interface for it and link the output of your code to a window in your interface.

If you're just doing a command line program, after building it, go into the build folder inside your project folder, and you should find the executable. Open a terminal window, drag in the executable file and hit return.


Bubba_T
Fast Faisil Strikes Again
Premium
join:2001-09-22
Columbus, IN
Ok, thanks for the tip. I don't think I was specifying that this was a command line utility. Also Johnny See Profile said to use Console and run from there so I could see my output. That works awesome too, but I'm not getting the result that I believe I should be getting. Can you take a look at my code and tell me if I've missed something? I've been staring at it for the past hour and can't figure it out.

--
He must have been an admiral a sultan or a king, and to his praises we shall always sing. Look what he has done for us he's filled us up with cheer! Lord bless Charlie Mops, the man who invented beer.


Epyon9283
Premium
join:2001-12-26
Trenton, NJ
reply to Bubba_T


Bubba_T
Fast Faisil Strikes Again
Premium
join:2001-09-22
Columbus, IN
Oh my gosh!!!!! Am I really that blind??? I had one '"' out of place and it was wreaking havoc on my program. Thanks Epyon9283 See Profile


Bubba_T
Fast Faisil Strikes Again
Premium
join:2001-09-22
Columbus, IN
reply to Bubba_T
Ok, now here's another question. I know this is a command line program, but could I make this, or other command line programs into a graphical type of progam/interface? I guess what I'm saying is, could I use interface builder somehow?
--
He must have been an admiral a sultan or a king, and to his praises we shall always sing. Look what he has done for us he's filled us up with cheer! Lord bless Charlie Mops, the man who invented beer.


tigers

join:2001-01-14
Irmo, SC
Unfortunately, you're example wouldn't translate directly into use with IB. It'd be best to rewrite it in Objective-C from the start. I'd recommend heading over to cocoadevcentral.com and checking out their tutorials and if you really want to get into it, check out "Programming in Objective-C" by Kochan and "Cocoa Programming for Mac OS X" by Hillegass, both of which are excellent in my opinion.