Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 14:20, 2 December 2012 by lpvalente (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Getting started with Maemo development using C

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Created: rbelwal (11 Dec 2007)
Last edited: lpvalente (02 Dec 2012)



This article provides an overview on how to develop for Maemo using C.


Scratchbox which is a cross compilation tool is required. Check for more details.

Xephyr is required to launch the application framework and execute GUI applications.

Install the Maemo SDK (( you need to have a Linux OS to install the SDK though Debian and Ubuntu are recommended and Xephyr is included in most of the Linux distributions). Also if you want to install SDK on your windows machine you have to emulate a Linux environment to be able to work with maemo SDK. For that pupose you need to set up the VMWARE player).

Creating a Helloworld application

After you have installed all the packages log into the scratchbox then select the x86 SDK target.

Create a folder in your scratchbox home directory and then move to that folder. Now create the file with the below source code

include <hildon/hildon-program.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkbutton.h>
void button_pressed()
int i = 0;
int p=100/i;
HildonProgram *program;
g_print ("%s - %d","Hello World-",p);
program = HILDON_PROGRAM(hildon_program_get_instance());
int main(int argc, char *argv[])
/* Create needed variables */
HildonProgram *program;
HildonWindow *window;
GtkWidget *button;
/* Initialize the GTK. */
gtk_init(&argc, &argv);
/* Create the hildon program and setup the title */
program = HILDON_PROGRAM(hildon_program_get_instance());
g_set_application_name("Hello Wiki!");
/* Create HildonWindow and set it to HildonProgram */
window = HILDON_WINDOW(hildon_window_new());
hildon_program_add_window(program, window);
/* Create button and add it to main view */
button = gtk_button_new_with_label("Hello!");
gtk_container_add(GTK_CONTAINER(window), button);
/* Connect signal to X in the upper corner */
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(gtk_main_quit), NULL);
/* Begin the main application */
/* Exit */

Further Reading

Writing a Plug-in for Maemo

This page was last modified on 2 December 2012, at 14:20.
27 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.