Active Topics

 


Reply
Thread Tools
Posts: 3 | Thanked: 0 times | Joined on Sep 2008
#1
I want to compile really small native C programs (like wrapper python modules) for maemo so I do not care about the compilation speed.

I don't want to install scratchbox on my linux box (it's too big and ugly and has no proper packaging) so I was thinking I could just compile right on the device.

but alas, gcc package appears stripped from its contents entirely save for the directories and readme files.

so is it not possible to compile for n900 directly on the device?

I heard about easy-debian but not sure if gcc there can be used to make native maemo apps, rather than apps that will only run inside debian chroot. If it can, I'll go for it.
 
bonapart's Avatar
Posts: 565 | Thanked: 816 times | Joined on Sep 2010 @ Nevinnomyssk
#2
you need to add SDK repository and install gcc
root
echo "deb http://repository.maemo.org fremantle/sdk free non-free">>sources.list
apt-get update
apt-get install gcc
 
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#3
Yes, it is possible. It is not straightforward though, there is a kind of circular dependency. I read a post some time ago about how to do it but I can't search for it now. Search a bit more and if you don't get anything, post here, when I get home I can give it a try.

EDIT: you beat me. I didn't know it was that easy...
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 
electroaudio's Avatar
Posts: 381 | Thanked: 336 times | Joined on Jan 2011 @ Stockholm, Sweden
#4
Thanks guys and ofcourse the OP for bringing it up
That was way easier than the ossguys GCC installation i saw earlier...

Now a related problem for a linux newbie like me...
How do i compile with gcc?
I tried "gcc filename.cpp" and got "no such file or directory"
__________________
Deskypplet , a desktop for N900 *RIP*
 
Posts: 502 | Thanked: 366 times | Joined on Jun 2010 @ /dev/null
#5
You have to be in the same directory as the source for your PWD. Also judging by the extension, the file may not be able to be compiled with gcc. gcc only handles c files primarily. You would need something like g++ to handle c plus plus (cpp) files.
__________________
 
electroaudio's Avatar
Posts: 381 | Thanked: 336 times | Joined on Jan 2011 @ Stockholm, Sweden
#6
Thanks, the C extension did the trick
But why did it give an error on include stdio.h , No such file or directory?
__________________
Deskypplet , a desktop for N900 *RIP*
 
Posts: 2,076 | Thanked: 3,268 times | Joined on Feb 2011
#7
For gcc/++ 4.2 install build-essentials from SDK repo. For 4.4 search for tannerlab repo and get all gcc related packages from there (uninstalling 4.2 first is advisable so they don't conflict, you need to manually select packages as there is no metapackage like build-essentials on it)
 
Posts: 502 | Thanked: 366 times | Joined on Jun 2010 @ /dev/null
#8
its looking for its dependencies. The dependency requested by that cpp file is standard input/output which is missing from either the PWD or from the defined location.
__________________
 
Posts: 2,076 | Thanked: 3,268 times | Joined on Feb 2011
#9
yeah, build-essentials includes some standard headers/libs, which is why installing it should fix it. gcc alone is just that, compiler.
 
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#10
If you want the SDK on your n900, click the link in my signature.
__________________
N9: Go white or go home
 

The Following User Says Thank You to daperl For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 19:21.