compiling C on terminal?

Discussion in 'Mac Programming' started by Simi131, May 2, 2009.

  1. Simi131 macrumors newbie

    May 2, 2009
    Hey, I'm new to programming and was trying to compile a simple helloworld.c program on terminal. But when I entered gcc helloworld.c, I get

    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib unknown flags (type) of section 6 (__TEXT,__literal16) in load command 0
    collect2: ld returned 1 exit status

    Any ideas?


    nevermind, I just needed to reinstall the developer tools, lol.
  2. NRose8989 macrumors 6502a

    Feb 6, 2008
    Do you have Xcode tools installed? Specifically the GCC compiler?

    Just by the looks of it, it looks like it's looking for GCC in your PATH but it's not finding it.

Share This Page