Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-10

GTK2: undefined references

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Johnson
to Marc Weustink: When I try to compile the LCL for GTK2 I get a whole lot of undefined references like: . .

What I understood from Mattias is, that you need to use pkg-config to get the proper libs to link and to make sure the ld-linux is first in the list(which is accomplished by the gtk2 packages), as glib2 bites it. So since fpc auto makes it last in the list normal makes don't work. If you wish to try the lazarus IDE in gtk2 this can be done in lazarus by installing the gtk2 package and the gtk2 interface package,(but not recompiling the ide when prompted), then compile lazarus for the gtk2 interface with packages. Otherwise you can create a shell script which does the same special linking for you(this is what I do).

If you just wish to run a test app you need to add the gtk2 package, and the gtk2 interface package to the projects depends. Then you can do it as usual. I believe Mattias added explicit instructions for this to the interfaces/gtk2/README

Andrew

Marc Weustink wrote 37 lines
Hi, When I try to compile the LCL for GTK2 I get a whole lot of undefined references like: . . ./lcl/units/gtk2/gtk2int.o(.text+0x28f1): In function `TGTK2OBJECT__SETPROPERTIES': gtk2object.inc:1185: undefined reference to `gtk_text_view_get_buffer' ./lcl/units/gtk2/gtk2int.o(.text+0x2900):gtk2object.inc:1186: undefined reference to `gtk_text_buffer_get_char_count' ./lcl/units/gtk2/gtk2int.o(.text+0x2928):gtk2object.inc:1188: undefined reference to `gtk_text_buffer_get_bounds' ./lcl/units/gtk2/gtk2int.o(.text+0x2940):gtk2object.inc:1189: undefined reference to `gtk_text_buffer_get_iter_at_offset' ./lcl/units/gtk2/gtk2int.o(.text+0x295c):gtk2object.inc:1190: undefined reference to `gtk_text_buffer_delete' ./lcl/units/gtk2/gtk2int.o(.text+0x2983):gtk2object.inc:1142: undefined reference to `gtk_label_set_line_wrap' ./lcl/units/gtk2/gtk2int.o(.text+0x29bc):gtk2object.inc:1143: undefined reference to `gtk_misc_set_alignment' ./lcl/units/gtk2/gtk2int.o(.text+0x29d5):gtk2object.inc:1145: undefined reference to `gtk_label_set_line_wrap' ./lcl/units/gtk2/gtk2int.o(.text+0x29ff):gtk2object.inc:1146: undefined reference to `gtk_label_set_justify' . . etc How do I solve this. Marc _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Marc Weustink

Hi,

When I try to compile the LCL for GTK2 I get a whole lot of undefined references like:
.
.
./lcl/units/gtk2/gtk2int.o(.text+0x28f1): In function `TGTK2OBJECT__SETPROPERTIES':
gtk2object.inc:1185: undefined reference to `gtk_text_view_get_buffer' ./lcl/units/gtk2/gtk2int.o(.text+0x2900):gtk2object.inc:1186: undefined reference to `gtk_text_buffer_get_char_count'
./lcl/units/gtk2/gtk2int.o(.text+0x2928):gtk2object.inc:1188: undefined reference to `gtk_text_buffer_get_bounds'
./lcl/units/gtk2/gtk2int.o(.text+0x2940):gtk2object.inc:1189: undefined reference to `gtk_text_buffer_get_iter_at_offset'
./lcl/units/gtk2/gtk2int.o(.text+0x295c):gtk2object.inc:1190: undefined reference to `gtk_text_buffer_delete'
./lcl/units/gtk2/gtk2int.o(.text+0x2983):gtk2object.inc:1142: undefined reference to `gtk_label_set_line_wrap'
./lcl/units/gtk2/gtk2int.o(.text+0x29bc):gtk2object.inc:1143: undefined reference to `gtk_misc_set_alignment'
./lcl/units/gtk2/gtk2int.o(.text+0x29d5):gtk2object.inc:1145: undefined reference to `gtk_label_set_line_wrap'
./lcl/units/gtk2/gtk2int.o(.text+0x29ff):gtk2object.inc:1146: undefined reference to `gtk_label_set_justify'
.
.
etc

How do I solve this.

Marc

Reply by email