[maemo-developers] [maemo-developers] Hello World
From: Gergely Buday gbuday at gmail.comDate: Fri Jun 3 16:59:59 EEST 2005
- Previous message: [maemo-developers] Printing support
- Next message: [maemo-developers] How to develop/distribute apps for the 770
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I'm to write a Hello World program based on section 5.3.1 (Writing maemo GUI applications/Windows/HildonApp of the Maemo SDK Tutorial. Unfortunately it doesn't work. Possibly I forgot to do something, so I ask for your experienced eyes to pick the errors. Running af-sb-init.sh restart I get the following error message: ============================================ [sbox-SDK_PC: ~/hello/src] > af-sb-init.sh restart & [1] 23087 [sbox-SDK_PC: ~/hello/src] > Stopping Statusbar Statusbar is not running Stopping Home Home is not running Stopping Task Navigator Task Navigator is not running Stopping Keyboard Keyboard is not running Stopping Matchbox window manager Stopping Sapwood image server Stopping D-BUS session bus daemon /sbin/start-stop-daemon: warning: failed to kill 23028: No such process Stopping DBUS system bus DBUS system bus is not running touch: cannot touch `/home/buday/MyDocs/foo.txt': No such file or directory touch: cannot touch `/home/buday/MyDocs/.videos/video1.mpg': No such file or directory touch: cannot touch `/home/buday/MyDocs/.videos/video2.avi': No such file or directory touch: cannot touch `/home/buday/MyDocs/.sounds/clip1.wav': No such file or directory touch: cannot touch `/home/buday/MyDocs/.sounds/clip2.mp3': No such file or directory touch: cannot touch `/home/buday/MyDocs/.documents/sheet1.xls': No such file or directory touch: cannot touch `/home/buday/MyDocs/.documents/document.doc': No such file or directory touch: cannot touch `/home/buday/MyDocs/.images/image1.png': No such file or directory touch: cannot touch `/home/buday/MyDocs/.images/image2.jpg': No such file or directory Starting DBUS system bus Starting D-BUS session bus daemon Starting Sapwood image server /usr/bin/af-sb-init.sh: line 36: 23195 Segmentation fault /sbin/start-stop-daemon --start -x $CMD -p $PIDFILE -o -m -q -- $PARAMS ** INFO: server started Starting Matchbox window manager Starting Keyboard ** (hildon-input-method:23219): WARNING **: Could not initialize osso from hildon-input-method 23219: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 3633. This is normally a bug in some application using the D-BUS library. 23219: arguments to dbus_connection_set_watch_functions() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 2958. This is normally a bug in some application using the D-BUS library. ** ERROR **: Not enough memory to set up DBusConnection for use with GLib aborting... Starting Task Navigator Starting Home Starting Statusbar ** ERROR **: file osso-manager.c: line 109 (osso_manager_singleton_get_instance): assertion failed: (0 && "Could not connect to osso") aborting... matchbox-wm: X error warning (0x600003): BadWindow (opcode: 18) matchbox-wm: X error warning (0x600003): BadWindow (opcode: 7) matchbox-wm: X error warning (0x600003): BadWindow (opcode: 6) ============================================ And here is what I wrote: My main.c: --- #include <hildon-widgets/hildon-app.h> #include <gtk/gtk.h> #include <libosso.h> int main(int argc, char** argv) { HildonApp* app; gtk_init(&argc, &argv); app = HILDON_APP(hildon_app_new()); hildon_app_set_title(app, ("My Title")); osso_initialize("helloWorld", "0.1", TRUE, NULL); gtk_widget_show_all(GTK_WIDGET(app)); gtk_main(); return 0; } --- [sbox-SDK_PC: ~/hello/src] > cat /usr/share/applications/hildon/hello.desktop [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=maemo hello Exec=/home/buday/hello/src/hello X-Osso-Service=org.maemo.hello Icon=qgn_list_gene_default_app ln -s /usr/share/applications/hildon/hello.desktop /etc/others-menu/2200_tana_fi_extras/0010_hello.desktop [sbox-SDK_PC: ~/hello/src] > cat /usr/share/applications/hildon/hello.desktop [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=maemo hello Exec=/home/buday/hello/src/hello X-Osso-Service=org.maemo.hello Icon=qgn_list_gene_default_app [sbox-SDK_PC: ~/hello/src] > cat /usr/lib/dbus-1.0/services/hello.service Name=org.maemo.hello Exec=/home/buday/hello/src/hello and compiled main.c with gcc main.c -o hello `pkg-config --cflags --libs gtk+-2.0` `pkg-config --cflags --libs hildon-libs` `pkg-config --cflags --libs libosso` Thanks in advance Cheers - Gergely
- Previous message: [maemo-developers] Printing support
- Next message: [maemo-developers] How to develop/distribute apps for the 770
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]