Menu

#2 galculator does not compile

open
nobody
None
5
2014-05-07
2012-12-17
Thiago
No

I'm trying to compile galculator-2.0.1 but when I run make I get some errors like

galculator-general_functions.o: In function `set_button_color':
/home/user/Downloads/galculator-2.0.1/src/general_functions.c:268: undefined reference to `GTK_COLOR_CHOOSER'

I'm using Lubuntu 11.10. I read something about update to gtk3 but I don't want to install many thins or update almost the whole LXDE.

What should I install to solve the problem?

Discussion

  • Simon

    Simon - 2012-12-17

    Use
    ./configure --disable-gtk3
    to compile the GTK2 version of galculator. Does this solve the problem?

     
  • Thiago

    Thiago - 2012-12-17

    Now the error is
    galculator-main.o: In function print_usage': /home/user/Downloads/galculator-2.0.1/src/main.c:61: undefined reference togtk_get_micro_version'

    Well, there are many errors:
    galculator-main.o: In function print_usage': /home/thiago/Downloads/galculator-2.0.1/src/main.c:61: undefined reference togtk_get_micro_version'
    /home/thiago/Downloads/galculator-2.0.1/src/main.c:61: undefined reference to gtk_get_minor_version' /home/thiago/Downloads/galculator-2.0.1/src/main.c:61: undefined reference togtk_get_major_version'
    galculator-display.o: In function display_set_bkg_color': /home/thiago/Downloads/galculator-2.0.1/src/display.c:601: undefined reference togdk_rgba_parse'
    /home/thiago/Downloads/galculator-2.0.1/src/display.c:603: undefined reference to gtk_widget_override_background_color' galculator-general_functions.o: In functionset_button_color':
    /home/thiago/Downloads/galculator-2.0.1/src/general_functions.c:266: undefined reference to gdk_rgba_parse' /home/thiago/Downloads/galculator-2.0.1/src/general_functions.c:268: undefined reference toGTK_COLOR_CHOOSER'
    /home/thiago/Downloads/galculator-2.0.1/src/general_functions.c:268: undefined reference to gtk_color_chooser_set_rgba' galculator-general_functions.o: In functionset_window_size_minimal':
    /home/thiago/Downloads/galculator-2.0.1/src/general_functions.c:885: undefined reference to gtk_widget_get_preferred_size' galculator-callbacks.o: In functionon_prefs_result_color_set':
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:693: undefined reference to GTK_COLOR_CHOOSER' /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:693: undefined reference togtk_color_chooser_get_rgba'
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:694: undefined reference to gdk_rgba_to_string' galculator-callbacks.o: In functionon_prefs_stack_color_set':
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:722: undefined reference to GTK_COLOR_CHOOSER' /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:722: undefined reference togtk_color_chooser_get_rgba'
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:723: undefined reference to gdk_rgba_to_string' galculator-callbacks.o: In functionon_prefs_act_mod_color_set':
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:751: undefined reference to GTK_COLOR_CHOOSER' /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:751: undefined reference togtk_color_chooser_get_rgba'
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:752: undefined reference to gdk_rgba_to_string' galculator-callbacks.o: In functionon_prefs_inact_mod_color_set':
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:769: undefined reference to GTK_COLOR_CHOOSER' /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:769: undefined reference togtk_color_chooser_get_rgba'
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:770: undefined reference to gdk_rgba_to_string' galculator-callbacks.o: In functionon_prefs_bkg_color_set':
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:787: undefined reference to GTK_COLOR_CHOOSER' /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:787: undefined reference togtk_color_chooser_get_rgba'
    /home/thiago/Downloads/galculator-2.0.1/src/callbacks.c:788: undefined reference to gdk_rgba_to_string' galculator-ui.o: In functionposition_menu':
    /home/thiago/Downloads/galculator-2.0.1/src/ui.c:817: undefined reference to gtk_widget_get_preferred_size' /home/thiago/Downloads/galculator-2.0.1/src/ui.c:839: undefined reference togtk_widget_get_preferred_size'
    galculator-ui.o: In function ui_formula_entry_state': /home/thiago/Downloads/galculator-2.0.1/src/ui.c:1140: undefined reference togdk_rgba_parse'
    /home/thiago/Downloads/galculator-2.0.1/src/ui.c:1143: undefined reference to gtk_widget_override_color' /home/thiago/Downloads/galculator-2.0.1/src/ui.c:1144: undefined reference togtk_widget_override_color'
    /home/thiago/Downloads/galculator-2.0.1/src/ui.c:1145: undefined reference to gtk_widget_override_color' /home/thiago/Downloads/galculator-2.0.1/src/ui.c:1146: undefined reference togtk_widget_override_color'
    galculator-ui.o: In function set_table_child_font': /home/thiago/Downloads/galculator-2.0.1/src/ui.c:524: undefined reference togtk_widget_override_font'
    collect2: ld returned 1 exit status
    make[2]: [galculator] Erro 1
    make[2]: Saindo do diretório /home/thiago/Downloads/galculator-2.0.1/src' make[1]: ** [all-recursive] Erro 1 make[1]: Saindo do diretório/home/thiago/Downloads/galculator-2.0.1'
    make:
    [all] Erro 2

     

    Last edit: Thiago 2012-12-17
  • Simon

    Simon - 2012-12-17

    From a quick check it is in GTK3 only that gtk_micro_version is defined as gtk_get_micro_version. In GTK2, gtk_micro_version is an extern symbol.

    So your compilation seems to include GTK3 headers. This would explain the many errors. Pleae verify, that
    pkg-config gtk+-2.0 --cflags
    points to GTK2 headers only. What version of GTK2 are you using?

     
  • Thiago

    Thiago - 2012-12-17

    Sorry. I'm completely new on this. I typed

    thiago@vaio:~/Downloads/galculator-2.0.1$ pkg-config gtk+-2.0 --cflags
    -pthread -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/include/gtk-2.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12

    I don't know how to check for my version. I just want to compile it, I have never developed programs.

     
  • Simon

    Simon - 2012-12-17

    hmmh, it's hard to tell for me what the actual problem is. Would it be an option for you to completely install the headers of GTK3 on your machine, e.g. by

    sudo aptitude install libgtk-3-dev
    

    or from Ubuntu's Software Center?

    If so, just do a simple

    ./configure
    

    followed by make etc to compile the GTK3 version of galculator.

    best, simon

     

    Last edit: Simon 2012-12-17
  • Thiago

    Thiago - 2012-12-17

    Dear Simon, thanks. I have the newest version of libgtk-3-dev but it still does not compile.

     

    Last edit: Thiago 2012-12-17
  • Fabio D'Alfonso

    Fabio D'Alfonso - 2014-05-01

    Hi,
    I am getting the same error. Is there any news about getting it working?

    Thanks
    Fabio D'Alfonso

     
  • Fabio D'Alfonso

    Fabio D'Alfonso - 2014-05-02

    Just add that I ma using 11.04 natty and the gtk3 is detected, all this with the 2.1.3

     
  • Simon

    Simon - 2014-05-07

    Hi,
    sorry, there are no news about this. Do both builds (GTK2 and GTK3) fail?
    best, simon