PDA

View Full Version : compiling C on terminal?




Simi131
May 2, 2009, 02:28 PM
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.



NRose8989
May 4, 2009, 03:13 AM
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.