• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Optimal environment to compile C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimal environment to compile C


  • Subject: Re: Optimal environment to compile C
  • From: Eric Christiansen <email@hidden>
  • Date: Sun, 03 Aug 2008 18:35:11 -0400

The "Console" under the Run->Console menu shows the output.

The template file XCode generates compiles:


#include <stdio.h>

int main (int argc, const char * argv[]) {
    // insert code here...
    printf("Hello, World!\n");
    return 0;
}


Good luck!! Welcome aboard!

Eric Christiansen
508.823.6818


There are two ways of constructing a software design: one way is to make it so simple that there are obviously no deficiencies; the other is to make it so complicated that there are no obvious deficiencies.


-- C. A. R. Hoare



On Aug 3, 2008, at 6:17 PM, Vlado Krempl wrote:

Hello everyone.

Excuse my greenness, but I am an absolute beginner.
I am starting my uni course soon and am setting up the optimal environment for developing C programs.


My setup is
Mac Pro 2x2.66 Quad Core, Leopard, Xcode 3.0.

I read somewhere online that I had to unpack and install GCC, which I have done.(gcc 4.0)

I have created a new project using "Command Line Utility" then choosing "Standard Tool".

Opened the "main" file and renamed it "hello.c" with the basic code below:

main(){
printf("Hello World\n");
}

Question
1. How do I compile it? (Is it "Build and Go" button?) I get "Failed" when I do this .(with lots of syntax errors)
2. Where do I actually see the output of this file when I do a compile.


Thank you for taking the time to read this and any assistance will be much appreciated.

Cheers,

Vlado Krempl
Sydney, Australia

Just wanted to make sure I was going down the right road

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Optimal environment to compile C (From: Vlado Krempl <email@hidden>)

  • Prev by Date: Optimal environment to compile C
  • Next by Date: Re: Optimal environment to compile C
  • Previous by thread: Optimal environment to compile C
  • Next by thread: Re: Optimal environment to compile C
  • Index(es):
    • Date
    • Thread