Re: Compiling simple GTK+ input methods
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-app-devel-list gnome org
- Subject: Re: Compiling simple GTK+ input methods
- Date: Sat, 28 Jul 2007 11:08:47 +0200
On Sat, Jul 28, 2007 at 04:21:54AM -0400, Kyle James Cardoza wrote:
Now, I've tried. My google-fu has failed me.
Googling is pointless, if you have the Gtk+ Makefile that
compiles the input methods...
What I've got is a single .c file, containing a GTK+ input method for
Eastern Ojibwe, using Canadian Aboriginal Syllabics. I based it on the
GTK+ Inuktitut IM.
What I want is to compile that .c file into a GTK+ input method, so I
can test it, debug it, etc.
I asuume you have config.h or removed #include <config.h>
and "gtk/gtkintl.h" is replaced with <glib/gi18n.h> (or the
header copied from Gtk+ sources).
(a) Manually
libtool --mode=compile cc $(pkg-config --cflags gtk+-2.0) -DGETTEXT_PACKAGE=\"gtk+\"
-DGTK_LOCALEDIR=\"$(pkg-config --variable=prefix gtk+-2.0)/share/locale\" -Wall -W -g -O2 -c iminuktitut.c
libtool --mode=link cc $(pkg-config --cflags --libs gtk+-2.0) -Wall -W -g -O2 -avoid-version -module -rpath
$(pkg-config --variable=libdir gtk+-2.0)/gtk+-2.0/$(pkg-config --variable=gtk_binary_version
gtk+-2.0)/immodules -o iminuktitut.la iminuktitut.lo
libtool --mode=install install -c iminuktitut.la $(pkg-config --variable=libdir
gtk+-2.0)/gtk+-2.0/$(pkg-config --variable=gtk_binary_version gtk+-2.0)/immodules/iminuktitut.la
(b) Properly
Copy the relevant delcarations from Gtk+'s
modules/input/Makefile.am, add the corresponding configure
and it will compile. The only non-obvious trick may be
finding out the Gtk+ binary version for determining the
installation directory with
pkg-config --variable=gtk_binary_version gtk+-2.0
(you should put all this configuration into proper configure
tests of course).
Yeti
--
http://gwyddion.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]