Reply
Thread Tools
Posts: 9 | Thanked: 0 times | Joined on Jun 2009 @ Helsinki
#1
Hi guys I am starting with maemo development and I am having troubles compiling and running hello world......I basically followed nokias maemo diablo application development training material but I seem not to get it working or I just need some help understanding the framework.... so what I did was that I created gtk_ helloworld-2.c and I saved it on my user folder/home I guess running ubuntu 8.10 so then I tried building the program with the following :

[sbox-DIABLO_ARMEL: ~] > gcc -Wall `pkg-config --cflags gtk+-2.0` \ gtk_helloworld-2.c -o gtk_helloworld-2 `pkg-config --libs gtk+-2.0`
sbox-arm-linux-gcc: gtk_helloworld-2.c: No such file or directory
[sbox-DIABLO_ARMEL: ~] >

so it just won't find my file...so I am not quite sure where to place the file, because that sbox-DIABLO_ARMEL: ~ I have seen some other tutorials which show other location like sbox-DIABLO_ARMEL: ~/ development or different but maybe I am doing something wrong building. Could I get some help here please :s?? I will be so grateful. Thanks in advance

 
BrentDC's Avatar
Posts: 903 | Thanked: 632 times | Joined on Apr 2008
#2
sbox-DIABLO_ARMEL: ~ is actually /scratchbox/users/<your username>/home/<your username>/ (I think). It is something like that though...
__________________
-Brent

Author of TouchSearch -- web searching software for Maemo 5.

Mobile Device lineage: Palm Z22 -> Palm TX -> Nokia N800 -> Nokia N900
 

The Following User Says Thank You to BrentDC For This Useful Post:
VDVsx's Avatar
Posts: 1,070 | Thanked: 1,604 times | Joined on Sep 2008 @ Helsinki
#3
You should place the file inside scratchbox, usually '/scratchbox/users/your_user_name/home/your_user_name'

HTH
__________________
Valério Valério
www.valeriovalerio.org
 

The Following User Says Thank You to VDVsx For This Useful Post:
Posts: 5,335 | Thanked: 8,187 times | Joined on Mar 2007 @ Pennsylvania, USA
#4
This is a duplicate of an earlier thread.

Please do not post duplicate threads.
__________________
maemo.org profile
 
Posts: 9 | Thanked: 0 times | Joined on Jun 2009 @ Helsinki
#5
Thanks, VDVsx and I apologize for the second thread sjgadsby, I thought I was gonna get a faster response :P. Sorry about that it wont happen again.

So, well I am not able to build it still I made sure that I was in the right location and I tried to build it again with the following :


[sbox-DIABLO_ARMEL: ~] > ls
MyDocs maemo-sdk-nokia-binaries_4.1.2.sh
gtk_helloworld-2.c maemo-sdk-rootstrap_4.1.2_armel.tgz
maemo-sdk-nokia-binaries_4.1.2 maemo-sdk-rootstrap_4.1.2_i386.tgz
[sbox-DIABLO_ARMEL: ~] > gcc -Wall `pkg-config --cflags gtk+-2.0` \ gtk_helloworld-2.c -o gtk_helloworld-2 `pkg-config --libs gtk+-2.0`
sbox-arm-linux-gcc: gtk_helloworld-2.c: No such file or directory
[sbox-DIABLO_ARMEL: ~] >

can sombody take a look at this? Thanks

brangi
 
VDVsx's Avatar
Posts: 1,070 | Thanked: 1,604 times | Joined on Sep 2008 @ Helsinki
#6
Try: gcc -o gtk_helloworld-2 gtk_helloworld-2..c ‘pkg-config gtk+-2.0 --cflags --libs‘ -Wall
__________________
Valério Valério
www.valeriovalerio.org
 
Posts: 45 | Thanked: 17 times | Joined on Nov 2008 @ Montreal, Canada
#7
Originally Posted by brangi View Post
[sbox-DIABLO_ARMEL: ~] > gcc -Wall `pkg-config --cflags gtk+-2.0` \ gtk_helloworld-2.c -o gtk_helloworld-2 `pkg-config --libs gtk+-2.0`
sbox-arm-linux-gcc: gtk_helloworld-2.c: No such file or directory

brangi
You are tying to compile a file called " gtk_helloworld-2.c": note the space at the beginning. The backslash makes the shell not treat the one preceding space as "whitespace". Take it out and it should work.
 

The Following User Says Thank You to jthiemann For This Useful Post:
Posts: 9 | Thanked: 0 times | Joined on Jun 2009 @ Helsinki
#8
Thanks both of you VDVsx and jthiemann....I was able to build it apparently with your solutions....but when running both examples...I got the following result:



[sbox-DIABLO_ARMEL: ~] > gcc -o gtk_helloworld-2 gtk_helloworld-2.c `pkg-config gtk+-2.0 --cflags --libs`-Wall
[sbox-DIABLO_ARMEL: ~] > ./gtk_helloworld-2
gtk_helloworld-2[15920]: GLIB WARNING ** Gtk - cannot open display:
[sbox-DIABLO_ARMEL: ~] > gcc -o gtk_helloworld-1 gtk_helloworld-1.c `pkg-config gtk+-2.0 --cflags --libs`-Wall
[sbox-DIABLO_ARMEL: ~] > ./gtk_helloworld-1
gtk_helloworld-1[15955]: GLIB WARNING ** Gtk - cannot open display:
[sbox-DIABLO_ARMEL: ~] >


any suggestions here? thanks


brangi

 
VDVsx's Avatar
Posts: 1,070 | Thanked: 1,604 times | Joined on Sep 2008 @ Helsinki
#9
You have to start a Xephyr window outside SB and then start the hildon dektop inside SB (warning the hildon desktop don't work inside SB in some diablo versions for the ARM target, use X86 target instead).

Outside SB in a console type:
Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb &

Inside SB type:

export DISPLAY=:2
af-sb-init.sh start
run-standalone.sh ./gtk_helloworld-2

For more information read the official maemo doc: http://maemo.org/maemo_release_documentation/maemo4.1.x/Maemo_Diablo_Reference_Manual_for_maemo_4.1.pdf
__________________
Valério Valério
www.valeriovalerio.org
 

The Following User Says Thank You to VDVsx For This Useful Post:
Posts: 9 | Thanked: 0 times | Joined on Jun 2009 @ Helsinki
#10
Thank you VDVsx!! got my first hello world...I think with this can keep up with development more.
 
Reply


 
Forum Jump


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