L
lzco
Guest
hi,
I want to compile C programs using the terminal (Darwin). I have an ibook with os x 10.4.2 .
I installed the Xcode Tools development package, along with gcc4.0 and gcc3.3 packages that come with Tiger under the Applications/Installers folder.
When I try to compile a simple hello world program, this is what i get:
I would like to know how to properly installed gcc so that I can compile from the terminal, since I like writing my c programs using a simple text editor.
I thought that by just installing the XCode Tools I was going to be able to compile c programs, but I guess i was wrong :dummy:
In advance, thanks for your help
I want to compile C programs using the terminal (Darwin). I have an ibook with os x 10.4.2 .
I installed the Xcode Tools development package, along with gcc4.0 and gcc3.3 packages that come with Tiger under the Applications/Installers folder.
When I try to compile a simple hello world program, this is what i get:
ibook:~/Documents era$ ls
assign1 hello.c
ibook:~/Documents era$ cat hello.c
#include <stdio.>
main() {
printf("Hello World!\n");
}
ibook:~/Documents era$ gcc -c hello.c
hello.c:1:18: error: stdio.: No such file or directory
hello.c: In function 'main':
hello.c:4: warning: incompatible implicit declaration of built-in function 'printf'
ibook:~/Documents era$ cd /usr/include
ibook:/usr/include era$ ls
gcc stdint.h
ibook:/usr/include era$ ls
gcc stdint.h
ibook:/usr/include era$ cd gcc
ibook:/usr/include/gcc era$ ls
darwin
ibook:/usr/include/gcc era$ cd darwin
ibook:/usr/include/gcc/darwin ra$ ls
3.3 3.3-fast 4.0 default
ibook:/usr/include/gcc/darwin era$ cd 4.0
ibook:/usr/include/gcc/darwin/4.0 era$ ls
c++ ppc_intrinsics.h
machine stdint.h
I would like to know how to properly installed gcc so that I can compile from the terminal, since I like writing my c programs using a simple text editor.
I thought that by just installing the XCode Tools I was going to be able to compile c programs, but I guess i was wrong :dummy:
In advance, thanks for your help