Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newb question



Hope I chose the right list to post this question, please let me know which one I should use if not this one.

I'm new to programming on the Mac and I'm just trying to find where everything is and how it works.

So I'm starting at the bottom/basics and I'm trying the infamous "Hello World" beginning program.

I did a
mkdir sandbox
in the /Developer directory of the recently downloaded xcode 3.1 so I have someplace to experiment.
and in there I used vi to code:


//---------------------------------------
#include <stdio.h>

int main(){
   printf("Hello World!");
   return (0);
}//main
//---------------------------------------

and saved as hello.c
then I did a
   cc -o hello hello.c
and I got an error
so then I tried gcc and I got the same error.......looks like this

steve-youngs-mac-pro:sandbox steve$ gcc -o hello hello.c
ld: can't open output file for writing: hello, errno=21
collect2: ld returned 1 exit status


What am I doing wrong?


Steve


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.