Reply
Thread Tools
Posts: 18 | Thanked: 1 time | Joined on Feb 2007
#1
Hi all,

I am new to all the linux material, I recently got a second hand 770 and have been trying to set up the develop environment to write some programs for my interest.

I follow the instruction,
http://maemo.org/platform/docs/howto..._tutorial.html (I am using ver 2.2)
Setup the scratchbox successfully and had the Maemo UI running properly. Now I got the maemo_hello.c code and try to compile it following the instruction:
gcc -o maemo_hello maemo_hello.c `pkg-config --cflags gtk+-2.0 hildon-libs` -ansi -Wall `pkg-config --libs gtk+-2.0 hildon-libs`

and I got a lot errors, which, I suppose, is cause by the wrong directory in the include file:

maemo_hello.c has the follow:
#include <hildon-widgets/hildon-program.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkbutton.h>

and I found that I shoud have
#include <gtk-2.0/gtk/gtkmain.h>
#include <gtk-2.0/gtk/gtkbutton.h>
instead, I have the directory called gtk-0.2 rather than just gtk

same thing happens in the hildon-program.h file,
it has other #include calling the gdk, glib, gtk etc.. but I have glib-2.0, gtk2.0 , etc in my system instead.

Does anybody had the same problem b4? how do you deal with it? Do I need to change all the heading one by one?

Thanks a lot.
 
Posts: 114 | Thanked: 7 times | Joined on Jan 2006
#2
Actually, if you move to an autoconf/make build situation, you can specify the libraries you'll be using in your configuration files, and when you run autoconf/configure, it'll expand and correct the directory structures properly. This way you can include gtk/*, rather than gtk-x.y
 
Posts: 114 | Thanked: 7 times | Joined on Jan 2006
#3
how about I bother to post a link, rather than mumble crazy !

http://autotoolset.sourceforge.net/tutorial.html#SEC50

Or, google for "tutorial autoconf automake" to start you off.
 
Reply


 
Forum Jump


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