View Single Post
torx's Avatar
Posts: 231 | Thanked: 21 times | Joined on May 2007 @ Singapore
#1
[Last update: 21 July 07]

Here's how to do C/C++ compiling on the unit itself.

What you need:

gainroot
xterm (apt-get install osso-xterm)
wget (Download from: http://maemo.org/downloads/product/wget/)


Instructions:

First, fire up your xterm and type the following lines

Code:
sudo gainroot

//Now cd into a directory with at least 15mb free space

wget http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/libstdc++6_3.4.4cs2005q3.2-5.osso3_armel.deb http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/gcc-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb  http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/libstdc++6-dev_3.4.4cs2005q3.2-5.osso3_armel.deb  http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/g++-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb  http://repository.maemo.org/pool/maemo3.1/free/binary/libc6_2.3.5cs2005q3.2-5.osso12_armel.deb  http://repository.maemo.org/pool/maemo3.1/free/binary/linux-kernel-headers_2.6.16.osso7_armel.deb  http://repository.maemo.org/pool/maemo2.2/free/b/binutils/binutils_2.16.91cs2005q3.2-5.osso1_armel.deb
http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/cpp-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb

//After all the packages are downloaded

dpkg -i binutils_2.16.91cs2005q3.2-5.osso1_armel.deb
dpkg -i linux-kernel-headers_2.6.16.osso7_armel.deb 
dpkg -i libc6-dev_2.3.5cs2005q3.2-5.osso12_armel.deb
dpkg -i cpp-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb
dpkg -i gcc-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb

//you will encounter dependencies error with the following steps. 
//It's perfectly "alright"

dpkg -i libstdc\+\+6-dev_3.4.4cs2005q3.2-5.osso3_armel.deb
dpkg -i g\+\+-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb

//the following step will fix the depencies error
apt-get -f install
After you have done so, you will now be able to compile with the command

Code:
g++-3.4 yourprogramhere.cpp
**Do note that you will get a permission error if you try to compile your source files located on a vfat storage.

These steps are put together by a linux beginner who has no idea what he is doing. It didn't screw up my installation, but your mileage may vary.

Last edited by torx; 2007-07-21 at 08:43.
 

The Following 8 Users Say Thank You to torx For This Useful Post: