Author Topic: Error compiling Gtk+..  (Read 3184 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Error compiling Gtk+..
« on: September 29, 2007, 02:34:50 am »
When compiling Gtk+...

Code: [Select]
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_visited'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_remove_item'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_hash_table_get_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_intern_static_string'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_object_force_floating'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_pdf_surface_create'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_description'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_pdf_surface_create_for_stream'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_key_file_get_double'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_modified'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_has_item'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_is_private'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_add_group'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_app_info'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_title'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_object_is_floating'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_groups'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_load_from_file'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_key_file_set_double'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_uris'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_free'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_hash_table_ref'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_set_description'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_slice_alloc'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_applications'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_object_ref_sink'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_set_title'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_initially_unowned_get_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_add_application'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_added'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_type_register_static_simple'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_param_spec_ref_sink'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_size'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_to_file'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_new'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_hash_table_unref'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_surface_set_fallback_resolution'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_set_is_private'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_move_item'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_slice_free_chain_with_offset'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_intern_string'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_mime_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_pdf_surface_set_size'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_set_mime_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_surface_get_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_date_set_time_t'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_slice_free1'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_ps_surface_set_size'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_slice_alloc0'

I'm guessing Slack 12.0 doesn't come with the X headers, eh? Where can I get them, or if I'm wrong, what happened?
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Error compiling Gtk+..
« Reply #1 on: September 29, 2007, 07:24:41 am »
Compiling GTK is a pain, you need the right version of like 10 other libraries. I suggest not ever doing it.

If you really want to, you should probably ask on linuxquestions.org or something, not here.

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: Error compiling Gtk+..
« Reply #2 on: September 29, 2007, 10:00:56 am »
Insert `gtk-config --libs` in your gcc/g++ flags.
e.g.
gcc -o myprog `gtk-config --libs` one.o two.o three.o

Not sure if gtk-config is for gtk or gtk+...let me know.  It should not be hard to compile a gtk app.
An adorable giant isopod!

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Error compiling Gtk+..
« Reply #3 on: September 29, 2007, 10:21:04 am »
Insert `gtk-config --libs` in your gcc/g++ flags.
e.g.
gcc -o myprog `gtk-config --libs` one.o two.o three.o

Not sure if gtk-config is for gtk or gtk+...let me know.  It should not be hard to compile a gtk app.
He's not compiling a gtk app, he's compiling gtk itself. Not sure if that makes any difference to your advice.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Error compiling Gtk+..
« Reply #4 on: September 29, 2007, 03:13:49 pm »
I'd rather hear back from nslay about that before modifying a gazillion-line makefile.

EDIT -
Following a combination of advice from you and Ergot (see firefox thread), I grabbed the package from the Package Browser and just installed it. For the record though, that was a problem with missing X headers, right?
« Last Edit: September 29, 2007, 03:20:42 pm by Joe[x86] »
I'd personally do as Joe suggests

You might be right about that, Joe.