Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

C compiler in Snow Leopard Terminal!?!?!?

  • 07-10-2009 3:29pm
    #1
    Registered Users, Registered Users 2 Posts: 1,304 ✭✭✭


    Hey! I recently up graded to snow leopard. Since then I have been unable to compile c files using the cc command in the terminal. I use xcode to write my C files but I cant figure out how to compile the files in xcode.
    Can anyone shed some light on where the compiler is gone and how to compile a basic c program using xcode! Any help would be appreciated!


Comments

  • Registered Users, Registered Users 2 Posts: 2,534 ✭✭✭FruitLover


    Do you get some sort of error message? Maybe try gcc instead.


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    There should be a compile button in the project window (I think) in Xcode.


  • Registered Users, Registered Users 2 Posts: 6,790 ✭✭✭cornbb


    First try gcc instead of cc. If that doesn't work Install Xcode/developer tools from your install DVDs and make sure you install the optional Unix development tools.

    To build in Xcode just hit cmd-B. Make sure your project is initially set up using cmd-shift-N and then set up with an appropriate template (console or terminal or something. Can't remember off the top of my head)


  • Hosted Moderators Posts: 7,486 ✭✭✭Red Alert


    gcc -v
    should tell you the version.

    XCode should just automatically compile any C files you put in there into a project.


  • Registered Users, Registered Users 2 Posts: 1,304 ✭✭✭oneofakind32


    My compiler looks a bit like this.
    neal-heneghans-computer:desktop nealheneghan$ ls
    Big Me.rtf crucial order no..rtf
    C junk guess.c
    neal-heneghans-computer:desktop nealheneghan$ cc guess.c
    -bash: cc: command not found
    neal-heneghans-computer:desktop nealheneghan$ gcc guess.c
    -bash: gcc: command not found
    neal-heneghans-computer:desktop nealheneghan$ gcc -v
    -bash: gcc: command not found
    neal-heneghans-computer:desktop nealheneghan$ gcc-v
    -bash: gcc-v: command not found
    neal-heneghans-computer:desktop nealheneghan$
    Will try reinstalling xcode from the snow leopard disk and get back to ye


  • Advertisement
  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    You sure you've put Xcode on it?


  • Closed Accounts Posts: 3,152 ✭✭✭ozt9vdujny3srf


    As far as I am aware, for snow leopard you need to install the version that comes with it or later for it to work.


Advertisement