Reply
Thread Tools
Posts: 4 | Thanked: 1 time | Joined on Dec 2009
#1
Hello everyone,
I am a new n900 user (in a week) and i'd like to ask something. Let's say i make some applications in c or c++ or python on my pc, compiled etc....... if i transfer the executable on my n900 will it recognize them and run them ??? especially for c and python ?

Thanks

ps. i am talking about simple or general applications not something specific on windows pc systems
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#2
For C/C++, no. It must be compiled for the ARM processor, and link to libraries available to the N900 (for GUI). Development for the N900 is done via a "virtual machine"/"emulator" that pretends to be an ARM.. and you setup a full build environment that contains the Hildonized GUI libraries.

For python, it depends what modules you use and how it was coded. In theory, python should work fine.. and for a GUI, pyGTK and pyQT should both work fine.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 
Posts: 237 | Thanked: 157 times | Joined on Dec 2009 @ San Diego, CA
#3
If you compile c/c++ apps on your desktop, and don't use the SDK, they will be built for x86 processors and will not run on the n900 as it is running an ARM based processor. The Maemo SDK/Scratchbox are necessary to crosscompile for ARM. The same c/c++ code should work fine (with a recompile) so long as you aren't doing anything platform specific.

For python this is not an issue, if the necessary dependencies are installed, your python app should run fine.

Note that if your using a GTK or QT ui, the app will likely run out of the box, but you'll probably want to tweak the UI for the smaller display.

I've posted an example Python/PySide(qt4) app here: http://talk.maemo.org/showthread.php?t=37089

This app I originally wrote for desktops, and though it ran perfectly out of the box on the n900, the UI was unusable on the smaller display and required some modification.
 
Posts: 355 | Thanked: 566 times | Joined on Nov 2009 @ Redstone Canyon, Colorado
#4
You will need to set up a scratchbox to compile the applications. After they are built, you will need to make them into .debs to install them cleanly. I have some pointers here which may help:

http://wiki.maemo.org/User:Jebba#Package_Building_HOWTO

-Jeff
 
Posts: 4 | Thanked: 1 time | Joined on Dec 2009
#5
oh now i get it somehow. i thought that C programs can run like that on it. anyway i'll figure it out about c. thanks for replying. one more question that will help me on that. how do i compile the code for the n900 ?
 
Posts: 486 | Thanked: 251 times | Joined on Oct 2009
#6
Originally Posted by lambrospower View Post
oh now i get it somehow. i thought that C programs can run like that on it. anyway i'll figure it out about c. thanks for replying. one more question that will help me on that. how do i compile the code for the n900 ?
Why not start with python, since it does not need to be compiled? The same script will run anywhere with python and any needed support modules and libraries.

If it turns out that you need C for performance or other reasons, you can start getting set up with an SDK, but there is quite a bit of overhead getting started with that.
 
Posts: 355 | Thanked: 566 times | Joined on Nov 2009 @ Redstone Canyon, Colorado
#7
Originally Posted by lambrospower View Post
oh now i get it somehow. i thought that C programs can run like that on it. anyway i'll figure it out about c. thanks for replying. one more question that will help me on that. how do i compile the code for the n900 ?
You need to set up a scratchbox to cross-compile.

Official docs here:

http://wiki.maemo.org/Documentation/...K_Installation


My notes on it (with explanation how to get it working with Fedora 12), here:
http://wiki.maemo.org/User:Jebba#SDK


I have a public scratchbox that I can create an account for you. If you want access to it, email moe@blagblagblag.org.
http://www.freemoe.org/

-Jeff
 
Posts: 4 | Thanked: 1 time | Joined on Dec 2009
#8
hey thats great info from both of you and i am sure that i will use both of your links when i get my n900. but the reason i want to use c is because i am learning it now and i want to use it for my device too but if it's that much trouble i may start python as well just for my cell :P
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#9
Have a look at MADDE as well.

They call it a 'tech preview', which is what some people call the "beta" stage... but it's still quite easy and functional.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

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


 
Forum Jump


All times are GMT. The time now is 04:17.