description
Compile cpu level code to run on linux :) .. YIPPIE!! .. I compiled a linux program!! (9/5/2010)
location
programming
1 >>
// hello.c
#include <stdio.h>
int main()
{
printf("hello world");
return 0;
}
===================
2 >> gcc -o runname hello.c
3 >> ./runname
:)
---------------------------------------
http://www.codecoffee.com/tipsforlinux/articles/18.html
The reason you have to add the "./" to the filename is because your current working directory is not included in your path. The "./" means run the executable file first from the current directory. Excluding the current directory from the path is common on unix systems to prevent certain security problems.
(if gcc or cc not available .. sudo apt-get install build-essential) .. installs a lot of useful programs for building/compiling things.
author
uwk@squatterz.com