Active Topics

 


Reply
Thread Tools
Posts: 46 | Thanked: 17 times | Joined on Oct 2009
#1
I hope someone can help - as I have searched google, forums and the mameo development documentation without much success.

I have successfully created and compiled (xARMEL) a C++ helloworld application. I have run and tested this on the emulator and now want to copy it to my N900 physical device.

Here are the steps that I have completed thus far;

1. Installed rootsh on N900 - this was required to copy the file from the FAT partition (as you cannot run programs from there) to the ext3 partition /opt directory.

2. Modified the binary to allow execution chmod a+x

3. invoked run-standalone.sh helloworld

4. received errors stating that the hildonmm shared libraries are unavailable (of course they are available in the /usr/libs directory)

What am I doing wrong ? How can I get the shared library files to work with my binary ? I read on google about creating a symbolic link, but this seems a bit overkill - or is this a standard thing ?

Should I be statically linking in the libraries ? I dont really want to do this. Is there a way to specify the path to the libraries at compile time ?

I read the maemo documenation on packaging but this seems way overkill for helloworld.

Any help here would be much appreciated.
 
Posts: 71 | Thanked: 49 times | Joined on Sep 2009 @ Espoo
#2
what did the packaging article say that was different from what you did for your HelloWorld example?

As someone who has not looked at the docs , even for HelloWorld I would think you need to follow the guidelines.
I thought one of the purposes of HelloWorld is to get you used to the tool chains & programming environment.
 

The Following User Says Thank You to ymb For This Useful Post:
Posts: 66 | Thanked: 44 times | Joined on Nov 2009
#3
Could you give your gcc compile command string and the output of 'ldd helloworld'?

I have never had to use run-standalone.sh. Don't run your program as root though.
 

The Following User Says Thank You to kyle For This Useful Post:
Posts: 71 | Thanked: 12 times | Joined on Jan 2007 @ Dubai, UAE
#4
Check command env that should show PATH variable. Are you running program as a root or as a default user? Better not to run as a root.
 

The Following User Says Thank You to uris For This Useful Post:
Posts: 46 | Thanked: 17 times | Joined on Oct 2009
#5
thanks for the respones, i was running in the root shell i guess that may have changed the envrionment variables. I will give that a try. @ymb packaging is overkill for basic testing, and the documentation sucks hence the posts. @kyle, if the above doesnt work i'll post them up;

really appreciate the responses. if i get it working then i will documentt the steps and postback.
 
Posts: 46 | Thanked: 17 times | Joined on Oct 2009
#6
I tried out of the root shell and still it doesnt work. I have now looked a bit more closely at the error "libhildonmm-1.0.so.5 error missing shared libaray". When I look in /usr/lib I cannot see this file or any "mm" C++ library files.

I was also trying to run the program by simply typing in the name "helloworld" and I would get the erorr, "no such file or directory". I hadnt realised that I need to type the full path and filename to get it to run. Hence the reason why I was using run-standalone.sh!

Can someone confirm that the C++ libraries are not installed by default on a N900 - and if not, is there an easy (safe http://maemomm.garage.maemo.org/docs...-from-packages ?) way of installing them, perhaps a program from the apps manager that also has this dependancy ?

Last edited by jackabite; 2009-12-22 at 11:03.
 
Posts: 66 | Thanked: 44 times | Joined on Nov 2009
#7
Originally Posted by jackabite View Post
I tried out of the root shell and still it doesnt work. I have now looked a bit more closely at the error "libhildonmm-1.0.so.5 error missing shared libaray". When I look in /usr/lib I cannot see this file or any "mm" C++ library files.
I don't know why the Nokia forum site decided to do their helloworld in C++ when every program that comes with the device is written in C.

You're right- it just doesn't ship with certain libraries used for C++. The command you need is 'apt-get install libhildonmm'. Always good to follow this up with apt-get clean.

I was also trying to run the program by simply typing in the name "helloworld" and I would get the erorr, "no such file or directory". I hadnt realised that I need to type the full path and filename to get it to run. Hence the reason why I was using run-standalone.sh!
You can also use a relative path, ./helloworld for example. Only two extra keystrokes that way!
 

The Following User Says Thank You to kyle For This Useful Post:
Posts: 46 | Thanked: 17 times | Joined on Oct 2009
#8
Originally Posted by kyle View Post
I don't know why the Nokia forum site decided to do their helloworld in C++ when every program that comes with the device is written in C.

You're right- it just doesn't ship with certain libraries used for C++. The command you need is 'apt-get install libhildonmm'. Always good to follow this up with apt-get clean.



You can also use a relative path, ./helloworld for example. Only two extra keystrokes that way!
Thanks, I dont think the examples are specifically for C++, I choose to go that route as it's what I am used to. I compiled the app using the ESBox dev tools and just wanted some instant gratification on my device.

The documentation for copying and running to your device is just plain missing. There's some documentation for windows/.net developers but it's very out of date and talks about the N800!

I will follow the instruction on the maemomm.garage site and get the libraries installed. I am tempted to use the C library with C++ and just create my own wrappers if required. It seems that the C library is the main SDK and is fully supported, whilst the C++ stuff is a bit basic and missing a lot of the APIs anyway.

Thanks for the ./ tip!
 
Posts: 66 | Thanked: 44 times | Joined on Nov 2009
#9
Just use apt-get install. No need for special instructions. Who knows how old the content on the garage site is.
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:10.