• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Compiling programs & building executibles from the available source codes

Please tell me in detail how to compile or build a program executible in linux. I have PCQ2005 linux installed(complete).I have downloaded mplayer source code, how do I compile it?
  • 2
2 Solutions
mhapsekarAuthor Commented:
Also indicate what all compilers are to be used & whether they are available in pcqlinux
I'm not familiar with pcqlinux, but here are general instructions for compiling a program from source.

First, you probably got the file as a .tar.bz2 or a .tar.gz, so you'll need to "unzip" it:
For .tar.bz2:
>bunzip2 mplayer.tar.bz2
>tar -xvf mplayer.tar
For tar.gz
>tar -zxvf mplayer.tar.gz

Next, cd into the new mplayer directory that was created.  You should see a file called INSTALL.  Do a 'less install' to read this file - it will have instructions for compiling/installing, and they will probably be something like this:

Switch to root user:
You will be asked for the root password
#make install
Switch back to regular user

You will probably have a few dependencies (other programs that need to be installed first) with mplayer.  For most, these can be installed in a similar way.
>>Also indicate what all compilers are to be used

'make' and 'make install' are script files that will call the correct compilers, which should (hopefully) be installed already.  If not, you will get an error message telling you which compiler you need.
John has given the exact steps to build and install the player
I summarize
Most likely you might have gz extenstion
use the command as mentioned by John
1> Unpack the file with tar zxvf filename command
 i.e tar -zxvf mplayer.tar.gz

2> Change the directory to the new sundirectory where the software is unpacked with a command such as this one:
     cd software_dir
3> Read any README or INSTALL files to learn any specific instructions you must follow to build and install the software.
4> The details of building the software may differ slightly from one software package to another, but typically you type the following commands to build and install the software:

    make install
5> Finally read any other documentation that comes with the software to learn how to use the software and determine whether you must configure the software before using it.

Best of luck


Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now