Tuesday, May 09, 2006

some basic C command line crap

cc -o yourprog yourprog.c -I/path/to/header -L/path/to/libs

: the -o is the output file
: ie, the thing you want to run
: -c is object file
: if you did cc -c 1.c -c 2.c -c 3.c
: you'd have 1.o, 2.o, 3.o
: then you could cc -o foo 1.o 2.o 3.o
: and it would link foo from the object code

: btw
: if you use lowercase Ls
: -l math -l crypt -l thislib -l thatlib
: you can link in additionally libraries as needed

No comments:

Post a Comment