![]() |
HOWTO: C/C++ compiling on the unit itself.
[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 Code:
g++-3.4 yourprogramhere.cpp 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. |
Re: HOWTO: C/C++ compiling on the unit itself.
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 |
Re: HOWTO: C/C++ compiling on the unit itself.
Do you by any chance know where a copy of 'make' exists for the device?
|
Re: HOWTO: C/C++ compiling on the unit itself.
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 |
Re: HOWTO: C/C++ compiling on the unit itself.
Quote:
rob. |
Re: HOWTO: C/C++ compiling on the unit itself.
No dependency errors. Thanks.
|
Re: HOWTO: C/C++ compiling on the unit itself.
Doesn't seem to work :(
|
Re: HOWTO: C/C++ compiling on the unit itself.
i've successfully install gcc and osso/hildon library before the flash with the new os. But it's take too many place (100Mo).
|
Re: HOWTO: C/C++ compiling on the unit itself.
Quote:
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'). |
Re: HOWTO: C/C++ compiling on the unit itself.
Quote:
|
Re: HOWTO: C/C++ compiling on the unit itself.
can anyone supply a hint or fix for the binutils ld not finding shared libraries?
Code:
Nokia-N800-26:~# ldconfig -v | grep crypto thanks, rob. edit: the problem is with libs that do not end in .so : Code:
|
Re: HOWTO: C/C++ compiling on the unit itself.
I had some errors when i was trying to install g++. A file was missed in the wget step and another one that was downloaded wasn't installed.
Here is the modified script that worked for me. Code:
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.2/free/binary/libc6-dev_2.3.5cs2005q3.2-5.osso12_armel.debhttp://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.debhttp://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/cpp-3.4_3.4.4cs2 |
Re: HOWTO: C/C++ compiling on the unit itself.
Thanks rob and i.rachita for the update/fix!
Anyway rob, does that mean that libraries that end in .so will work now? Is it only libcrypto that is affected or are there other libraries that don't end in .so too? |
Re: HOWTO: C/C++ compiling on the unit itself.
Hi,
This looks brilliant, and i'll try it out soon. Should i consider converting/creating a new partition (efs and jffs2 are mentioned) on my internal memory card for this? |
Re: HOWTO: C/C++ compiling on the unit itself.
Quote:
|
Re: HOWTO: C/C++ compiling on the unit itself.
Great post, thanks for the info!
Much appreciated. |
Re: HOWTO: C/C++ compiling on the unit itself.
Agreed. Just followed a modified version to get gcc working on an N800 in OS2008 and it works a treat. Portable c++ development here I come.
|
Re: HOWTO: C/C++ compiling on the unit itself.
Hi,
Then, it's possible to compile a c or c++ app source like in any other linux dist? I'm thinking that if we have the make utilitie and c/c++ libs, it's possible to make ./configure make make install/or buid package with dpkg utilitie, is it true? sorry if this is an stupid question, i'm new with the IT, and escuse my poor english. |
Re: HOWTO: C/C++ compiling on the unit itself.
I would love to see a complete replacement for Scratchbox that runs on the tablet. Plus Glade.
This is way beyond my capabilities to create but I would cheer heartily from the sidelines.;) |
Re: HOWTO: C/C++ compiling on the unit itself.
This is so cool. As I read a PDF about C++ using the Evince Document reader, I can try out the examples using SciTE.
http://fkwjcw.bay.livefilestore.com/...Q/sciteIDE.png |
Re: HOWTO: C/C++ compiling on the unit itself.
I did this today, and had to update all of the WGETs to reflect the latest OS. As well the install for G++ had to be done simultaneously with the libc++-dev. Here is what I did:
wget http://repository.maemo.org/pool/dia...sso8_armel.deb wget http://repository.maemo.org/pool/dia...sso8_armel.deb wget http://repository.maemo.org/pool/dia...sso8_armel.deb wget http://repository.maemo.org/pool/dia...sso8_armel.deb wget http://repository.maemo.org/pool/dia...sso8_armel.deb wget http://repository.maemo.org/pool/dia...so10_armel.deb wget http://repository.maemo.org/pool/dia...so10_armel.deb wget http://repository.maemo.org/pool/mae...11-1_armel.deb wget http://repository.maemo.org/pool/dia...sso1_armel.deb dpkg -i binutils_2.16.91cs2005q3.2-5.osso1_armel.deb dpkg -i linux-kernel-headers_2.6.16.osso11-1_armel.deb dpkg -i libc6_2.5.0-1osso10_armel.deb dpkg -i libc6-dev_2.5.0-1osso10_armel.deb dpkg -i gcc-3.4_3.4.4cs2005q3.2-5.osso8_armel.deb dpkg -i cpp-3.4_3.4.4cs2005q3.2-5.osso8_armel.deb dpkg -i libstdc\+\+6_3.4.4cs2005q3.2-5.osso8_armel.deb dpkg -i libstdc\+\+6-dev_3.4.4cs2005q3.2-5.osso8_armel.deb g++-3.4_3.4.4cs2005q3.2-5.osso8_armel.deb apt-get -f install apt-get install make cd /usr/bin ln -s g\+\+\-3.4 g\+\+ After this I also downloaded the source for grep-2.4 to replace the busybox grep. This helps compiling many other packages: wget http://mirror.csclub.uwaterloo.ca/gn...rep-2.4.tar.gz gunzip -dc grep-2.4.tar.gz | tar -xv cd grep-2.4/ ./configure make make install rm /bin/grep ln -s /usr/local/bin/grep /bin/grep |
Re: HOWTO: C/C++ compiling on the unit itself.
Just one note; to get grep compiled I needed to use
./configure --host=arm-linux-gnueabi It couldn't detect what platform it was on. Also, you can also create links to egrep and fgrep as compiling this packages will give you all three egrep/fgrep/grep. Nathan. P.S. Is their some environmental variable I do need to set, so I do not have to use the --host, anyone know? |
Re: HOWTO: C/C++ compiling on the unit itself.
|
Re: HOWTO: C/C++ compiling on the unit itself.
Quote:
|
Re: HOWTO: C/C++ compiling on the unit itself.
|
Re: HOWTO: C/C++ compiling on the unit itself.
Looks like the lib6c version on the tablet isn't high enough for the program you want to use. You might want to try an older version of what you're wanting, as it probably has lower dependencies.
|
Re: HOWTO: C/C++ compiling on the unit itself.
where i can download gcc for C++,arm programming for my n900
|
All times are GMT. The time now is 20:16. |
vBulletin® Version 3.8.8