Compiling a single source file:
Hello!
I Would like to know how to compile a single source file using GCC. I have written programs in Windows, but in the future I want to do that in Linux. |
Code:
gcc -o EXECUTABLE file.c |
Thanks alot.
|
or:
(e.g: example.c) make example hint: don't call files 'test' there's a command of the same name. |
Quote:
Code:
gcc -Wall -o EXECUTABLE file.c Quote:
Your hint is correct, it fooled me a couple of times :( |
Quote:
Implicit make rules are in force. as I said make example will work observe: Code:
touch example.c |
Never to old to learn :study:
|
surprising how few people know about it!
It's dead useful :) |
All times are GMT -5. The time now is 08:17 AM. |