chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] easyffi and gtk


From: Tony Sidaway
Subject: [Chicken-users] easyffi and gtk
Date: Mon, 29 Jan 2007 02:35:41 +0000

I'm trying to do basic stuff with easyffi and gtk. Just some basic
sanity checks.

A very simple program that instantiates a toplevel window and terminates.

$ cat window.c
#>!
#include <gtk/gtk.h>
<#
(g_type_init)
(gtk_window_new GTK_WINDOW_TOPLEVEL)
Compilation:

$  csc  -v -X easyffi window.scm -C `pkg-config --cflags gtk+-2.0`
`pkg-config --libs gtk+-2.0`
/usr/local/bin/chicken window.scm -output-file window.c -quiet -extend easyffi
gcc window.c -o window.o -c -DHAVE_CHICKEN_CONFIG_H -Os
-fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized
-fomit-frame-pointer -DC_ENABLE_PTABLES  -I /usr/local/include
-I/usr/local/include/cairo -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include
rm window.c
gcc window.o -lchicken -o window  -L/usr/local/lib
-Wl,-R/usr/local/lib -L/usr/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext
-lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0
-lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  -ldl -lm
-lchicken
rm window.o


Run it:

$ ./window
Error: unbound variable: g_type_init

       Call history:

       window.scm: 4    g_type_init                    <--

Hmm, what am I doing wrong, here?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]