maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   On-device development in C/C++? (https://talk.maemo.org/showthread.php?t=34412)

anapospastos 2009-11-13 20:14

On-device development in C/C++?
 
I saw that for previous versions of maemo there is a C/C++ application. Can we have it for maemo 5? I am a student and it's very cool to write and run my exercises on n900

hopbeat 2009-11-13 20:20

Re: C/C++ program for n900
 
Do you mean C/C++ compiler on Maemo?

anapospastos 2009-11-13 21:55

Re: C/C++ program for n900
 
Quote:

Originally Posted by hopbeat (Post 375350)
Do you mean C/C++ compiler on Maemo?

yeah write compile and run. I ve seen this but i dont think it wiil work on n900

jolouis 2009-11-13 22:00

Re: C/C++ program for n900
 
Quote:

Originally Posted by anapospastos (Post 375447)
yeah write compile and run. I ve seen this but i dont think it wiil work on n900

Isn't gcc/automake/etc already available in the SDK repository?...

pelago 2009-11-13 22:15

Re: C/C++ program for n900
 
Yes, these are in the SDK repository (see for example http://maemo.org/packages/view/gcc-4.2). Can the SDK repository be used on a real device, and if so, is it safe, or is it risky like enabling extras-devel?

anapospastos 2009-11-14 09:56

Re: C/C++ program for n900
 
Quote:

Originally Posted by pelago (Post 375472)
Yes, these are in the SDK repository (see for example http://maemo.org/packages/view/gcc-4.2). Can the SDK repository be used on a real device, and if so, is it safe, or is it risky like enabling extras-devel?

any reply on this???

codeMonkey 2009-11-14 11:48

Re: C/C++ program for n900
 
I've had the sdk repository enabled on my n800 for quite a while - I've had no problems. YMMV

pycage 2009-11-14 12:03

Re: C/C++ program for n900
 
You can enable extras-devel or the SDK repo but you must not apt-get upgrade with these repos enabled. Just for installing gcc it should be safe.

Anyway, do this only if you know how to reflash a broken device. :)

lcuk 2009-11-14 12:40

Re: C/C++ program for n900
 
yes, but on a default n900 its won't work without some cleaning (for the reason see optification)
follow pycages advice, do not do this if you don't know how to cure any problems.

that out of the way,

i generally add the repo
deb http://repository.maemo.org fremantle/sdk free non-free

then
apt-get update
apt-get install build-essential

then remove the repo again and apt-get update once again.

as I say, it will fail because its large, but its the full set of things required for on device compilation :)

Quote:

The following extra packages will be installed:
binutils bzip2 cpio cpp cpp-4.2 dpkg-dev g++ g++-4.2 gcc gcc-4.2 gcc-4.2-base libc6 libc6-dev libgcc1 libgomp1 libstdc++6 libstdc++6-4.2-dev
libtimedate-perl linux-kernel-headers make patch perl perl-modules


note, this doesnt bring in autotools or dpkg
so no ./configure stage works, and no dpkg-buildpackage will run.
(normal make files and find an alternative for packaging)

if you don't need them and can work with makefiles its certainly usable and fast.
if you need -dev headers for libraries, expect even more space, I find nowadays I can get by mostly with libliqbase-dev

hth

daperl 2009-11-14 14:13

Re: C/C++ program for n900
 
Also, the most important thing for a big build (at least on the n8x0's using Easy Debian) is to set your tmp dir to storage, not memory. For example:

mkdir /bigpartition/tmp
export TMPDIR=/bigpartition/tmp
fakeroot dpkg-buildpackage ...


All times are GMT. The time now is 13:12.

vBulletin® Version 3.8.8