Reply
Thread Tools
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:
torx's Avatar
Posts: 231 | Thanked: 21 times | Joined on May 2007 @ Singapore
#2
I'm not sure if anyone actually cares about this thread, but anyway, some updates.

I have verified that the SciTE editor works fine at compiling c++ programs.

However, to use the compile button on Scite editor, you need to make type the following commands into your xterm.

Code:
sudo gainroot
cd /usr/bin
ln -s g\+\+\-3.4 g\+\+
Using the build command will however require 'make'.
 

The Following User Says Thank You to torx For This Useful Post:
Posts: 187 | Thanked: 28 times | Joined on Apr 2007 @ Southampton, UK
#3
Do you by any chance know where a copy of 'make' exists for the device?
__________________
There is no place like /home.
 
torx's Avatar
Posts: 231 | Thanked: 21 times | Joined on May 2007 @ Singapore
#4
Here it is.


This should get it installed IF there are no dependencies error. No time to check that now, but i will do that soon.

Code:
sudo gainroot

wget http://repository.maemo.org/pool/maemo2.2/free/m/make/make_3.80-9osso_armel.deb

dpkg -i make_3.80-9osso_armel.deb
 

The Following User Says Thank You to torx For This Useful Post:
Posts: 64 | Thanked: 9 times | Joined on Jun 2007 @ abuja, nigeria (currently)
#5
Originally Posted by torx View Post
I'm not sure if anyone actually cares about this thread, but anyway, some updates.
I'm watching and interested

rob.
 
Posts: 187 | Thanked: 28 times | Joined on Apr 2007 @ Southampton, UK
#6
No dependency errors. Thanks.
__________________
There is no place like /home.
 
Posts: 28 | Thanked: 3 times | Joined on Jul 2007
#7
Doesn't seem to work
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#8
i've successfully install gcc and osso/hildon library before the flash with the new os. But it's take too many place (100Mo).
 
torx's Avatar
Posts: 231 | Thanked: 21 times | Joined on May 2007 @ Singapore
#9
Originally Posted by seattleweb View Post
Doesn't seem to work
On the new OS? I have yet to tried it install it on the new OS yet, but i'll try it out this weekend.

edit: realised i left out wget-ing one of the files in my instructions. i have updated it, so try again if you will.

edit: seems like these instructions are not useful on the latest firmware ('chinook').

Last edited by torx; 2007-07-20 at 15:39.
 
torx's Avatar
Posts: 231 | Thanked: 21 times | Joined on May 2007 @ Singapore
#10
Originally Posted by Khertan View Post
i've successfully install gcc and osso/hildon library before the flash with the new os. But it's take too many place (100Mo).
On a uncompressed ext 2 filesystem, the whole installation takes up 50mb on my system. If you are using the jffs2 filesystem, it should be much lesser.
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:49.