New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Keep getting errors in Xcode!!!!!


Post Reply New Thread Subscribe

 
Thread Tools
miltonian

 
Member Since: Apr 28, 2013
Posts: 2
miltonian is on a distinguished road

miltonian is offline
I have read 3 different tutorials for learning objective c and c and I keep getting the same error messages in the terminal! The errors include: error: stray \37 in program and error: stray \377 in program... And many, many more

Here is one of the codes that I COPY AND PASTED from a tutorial:

#include <stdio.h>
int main() {
printf ("Hello World\n");
return 0;
}

PLEASE help me figure out the problem.
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,729
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
I'm using Xcode 4.6.2 and this is how you start a project for a C application.

File->New Project. Under OS X->Application->Command Line Tool. Hit Next and then choose a name for your program, ensure that the Type is set to C and then hit Next and Finish once you've chosen where yo save the project.

You will now to put into the project explorer and have the main.c and <projectname>.1 files. The first is your source file, of course, and the second is the MAN(ual) page for your program. The reason the MAN page was created is because we choose the Command Line Tool project.

As it turns out, the sample C-code that gets created for you is the basic Hello World program you are showing. Build your project with CMD+b and run with CMD+r, you will now see a All Output window appear on the bottom with the window where you'll see "Hello World" appear.

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks

Post Reply New Thread Subscribe


« Do people post about Hackintoshes on this site? | AVFoundation Video capture. »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Xcode 4: setting warnings to errors, JohnEH OS X - Development and Darwin 3 09-14-2012 01:53 PM
FLTK and Xcode 4 Bubbagump00 OS X - Development and Darwin 0 03-19-2012 02:07 PM
Weird file sizes in Finder slapple OS X - Operating System 23 01-26-2012 12:12 PM
How do you compile command line args within Xcode? Trev OS X - Development and Darwin 4 07-19-2011 04:55 PM

All times are GMT -4. The time now is 09:58 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?