Click to See Complete Forum and Search --> : Silly Compiling Question
Nailz
12-21-2000, 01:03 PM
**NOTE** I'm not a programmer, nor do I play one on TV.
BUT, if given a program...call it file.c, how do I compile it to make a binary out of it?
Assuming there are no other dependencies (other files)...
------------------
$> cd /pub
$> more beer
YaRness
12-21-2000, 01:08 PM
i'd try just "gcc file.c" and see what happens. i think with no arguments that creats an executable called "a.out". i could be wrong though.
------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/
------------------
Muzzafarath
12-21-2000, 01:09 PM
Well, it kinda depends on what compiler you want to use... http://www.linuxnewbie.org/ubb/wink.gif Using gcc:
gcc file.c -o file
You can then start it by running ./file...
Strike
12-21-2000, 03:26 PM
Actually, here's a neat trick most systems support. If you are just compiling a simple little one-file program like that, you can just type make file.c and it will do a cc file.c -o file for you. I always thought that was handy and short.