Re: Developing a widget - help with introspection and feedback

2013-10-02 Thread Damien Caliste
Hello,

Le 01/10/2013, Rena hyperhac...@gmail.com a écrit :
 Hi all, I'm developing my first GTK widget. I have it working OK, but
 I can't get g-ir-scanner to cooperate.
g-ir-scanner will generate a small executable linked to your library to
get info from the objects you have (for all _get_type() routine you
have). So it needs to be able to link to something. In your case
libgtk-display.so, because you ask it like that :

 $ g-ir-scanner gtk-display.[ch] --library=gtk-display `pkg-config
It is the --library option of g-ir-scanner.

Then the linking fails:
 g-ir-scanner: link: libtool --mode=link --tag=CC gcc -o
 /home/rena/dev/pc/src/gtk-display/tmp-introspectNvmnq2/GtkDisplay-0.1
 -export-dynamic
 /home/rena/dev/pc/src/gtk-display/tmp-introspectNvmnq2/GtkDisplay-0.1.o
 -L. -lgtk-display -Wl,--export-dynamic -pthread -lgio-2.0
See here the « -L. -lgtk-display ».

So, your Makefile should be done to create this libgtk-display.so file
for it to work.

If you have already a libgtk-display.so, sorry, it's not the reason :(

Damien.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Developing a widget - help with introspection and feedback

2013-10-02 Thread David Nečas
On Tue, Oct 01, 2013 at 09:08:12PM -0400, Rena wrote:
 Hi all, I'm developing my first GTK widget. I have it working OK, but I
 can't get g-ir-scanner to cooperate.

Since you don't use libtool to build the library (which I strongly
recommend against but it's your fight) pass --no-libtool to
g-ir-scanner.  It seems to work then.

Regards,

Yeti


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Developing a widget - help with introspection and feedback

2013-10-01 Thread Rena
Hi all, I'm developing my first GTK widget. I have it working OK, but I
can't get g-ir-scanner to cooperate.

Right now it's just a simple test widget (displays some text); later it
will display charts and graphs.
gtk-display.h: http://pastebin.com/7j6B4371
gtk-display.c: http://pastebin.com/G41uDQeE
test.c: http://pastebin.com/CMXduE5T
makefile: http://pastebin.com/b4xFv1jb

I'm not sure if I'm following all the conventions correctly, so feedback on
that would be nice. Also I get an error with g-ir-scanner:

$ g-ir-scanner gtk-display.[ch] --library=gtk-display `pkg-config --cflags
gobject-2.0 gtk+-3.0 gobject-introspection-1.0` --include=GObject-2.0
--namespace=GtkDisplay --nsversion=0.1 --output=GtkDisplay=0.1.gir
g-ir-scanner: compile: gcc -Wall -pthread -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gtk-3.0
-I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0
-I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2
-I/usr/include/pixman-1 -I/usr/include/libpng12
-I/usr/include/gobject-introspection-1.0 -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -c -o
/home/rena/dev/pc/src/gtk-display/tmp-introspectNvmnq2/GtkDisplay-0.1.o
/home/rena/dev/pc/src/gtk-display/tmp-introspectNvmnq2/GtkDisplay-0.1.c
g-ir-scanner: link: libtool --mode=link --tag=CC gcc -o
/home/rena/dev/pc/src/gtk-display/tmp-introspectNvmnq2/GtkDisplay-0.1
-export-dynamic
/home/rena/dev/pc/src/gtk-display/tmp-introspectNvmnq2/GtkDisplay-0.1.o -L.
-lgtk-display -Wl,--export-dynamic -pthread -lgio-2.0 -lgobject-2.0
-lgmodule-2.0 -lrt -lglib-2.0
libtool: link: gcc -o
/home/rena/dev/pc/src/gtk-display/tmp-introspectNvmnq2/GtkDisplay-0.1
/home/rena/dev/pc/src/gtk-display/tmp-introspectNvmnq2/GtkDisplay-0.1.o
-Wl,--export-dynamic -pthread -Wl,--export-dynamic  -L. -lgtk-display
-lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -pthread
ERROR: can't resolve libraries to shared libraries: gtk-display

Again I might just be doing that wrong, or I'm encountering
https://bugzilla.gnome.org/show_bug.cgi?id=699442 ? I'm not really sure.

-- 
Sent from my Game Boy.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list