How to compile a file in unix or linux

Status
Not open for further replies.
Solution
Generally if you download a tarball containing source code, it's something like this. As skittle said, it kind of depends on the download.

tar xvf [tarball name]
cd [new directory name]
./configure
make
make install

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
Generally if you download a tarball containing source code, it's something like this. As skittle said, it kind of depends on the download.

tar xvf [tarball name]
cd [new directory name]
./configure
make
make install
 
Solution

rich2walk

Honorable
May 3, 2012
2
0
10,510

$ gcc -g foo.c -o foo
This works on my pcBSD 8.2 Hubble using gcc and fedora gcc
the -g is for debugging in gdb and the -o is for optomizei
 
when you extract the archive it usually contains a readme with installation instructions. be advised that most of the time your program has already been compiled and you can install it from your distro's repository or use a 3rd party repository. you can also install binary files that end in .deb for debian and ubuntu derivatives or rpm for fedora
 
Status
Not open for further replies.

TRENDING THREADS