roelj / inklingreader

A GNU/Linux-friendly version of the Wacom Inkling SketchManager.
GNU General Public License v3.0
50 stars 16 forks source link

build fails (version 0.8 and dev): mainwindow.c: undefined reference to `gtk_ #40

Open xuv opened 9 years ago

xuv commented 9 years ago

Hello @roelj

I'm trying to compile the latest version of the software to take some screenshots and work on the #39. But it fails in the same way both on the lastes version in master and in the latest release 0.8.

With code from master, I get errors like this:

  CCLD   inklingreader
src/gui/mainwindow.o: In function `gui_mainwindow_toggle_timing':
~/inklingreader/src/gui/mainwindow.c:998: undefined reference to `gtk_widget_is_visible'
src/gui/mainwindow.o: In function `gui_mainwindow_toggle_settings':
~/inklingreader/src/gui/mainwindow.c:985: undefined reference to `gtk_widget_is_visible'
src/gui/mainwindow.o: In function `gui_mainwindow_file_activated':
~/inklingreader/src/gui/mainwindow.c:612: undefined reference to `GTK_HEADER_BAR'
~/inklingreader/src/gui/mainwindow.c:612: undefined reference to `gtk_header_bar_set_title'
src/gui/mainwindow.o: In function `gui_mainwindow_init':
~/inklingreader/src/gui/mainwindow.c:133: undefined reference to `gtk_header_bar_new'
~/inklingreader/src/gui/mainwindow.c:134: undefined reference to `GTK_HEADER_BAR'
~/inklingreader/src/gui/mainwindow.c:134: undefined reference to `gtk_header_bar_set_show_close_button'
~/inklingreader/src/gui/mainwindow.c:135: undefined reference to `GTK_HEADER_BAR'
~/inklingreader/src/gui/mainwindow.c:135: undefined reference to `gtk_header_bar_set_title'
~/inklingreader/src/gui/mainwindow.c:136: undefined reference to `gtk_window_set_titlebar'
~/inklingreader/src/gui/mainwindow.c:147: undefined reference to `GTK_HEADER_BAR'
~/inklingreader/src/gui/mainwindow.c:147: undefined reference to `gtk_header_bar_pack_start'
~/inklingreader/src/gui/mainwindow.c:148: undefined reference to `GTK_HEADER_BAR'
~/inklingreader/src/gui/mainwindow.c:148: undefined reference to `gtk_header_bar_pack_start'
~/inklingreader/src/gui/mainwindow.c:149: undefined reference to `GTK_HEADER_BAR'
~/inklingreader/src/gui/mainwindow.c:149: undefined reference to `gtk_header_bar_pack_end'
~/inklingreader/src/gui/mainwindow.c:150: undefined reference to `GTK_HEADER_BAR'
~/inklingreader/src/gui/mainwindow.c:150: undefined reference to `gtk_header_bar_pack_end'
~/inklingreader/src/gui/mainwindow.c:276: undefined reference to `gtk_button_new_from_icon_name'
~/inklingreader/src/gui/mainwindow.c:277: undefined reference to `gtk_button_new_from_icon_name'
~/inklingreader/src/gui/mainwindow.c:278: undefined reference to `gtk_button_new_from_icon_name'
collect2: error: ld returned 1 exit status
make: *** [inklingreader] Erreur 1

and compiling version 0.8:

  CC     src/main.o
  CC     src/gui/mainwindow.o
src/gui/mainwindow.c: In function ‘gui_mainwindow_init’:
src/gui/mainwindow.c:142:15: warning: assignment makes pointer from integer without a cast [enabled by default]
src/gui/mainwindow.c:143:16: warning: assignment makes pointer from integer without a cast [enabled by default]
src/gui/mainwindow.c:144:18: warning: assignment makes pointer from integer without a cast [enabled by default]
src/gui/mainwindow.c:145:19: warning: assignment makes pointer from integer without a cast [enabled by default]
  CC     src/converters/svg.o
  CC     src/converters/png.o
  CC     src/converters/json.o
  CC     src/converters/pdf.o
  CC     src/parsers/wpi.o
  CC     src/high/conversion.o
  CC     src/datatypes/configuration.o
  CC     src/optimizers/point-reduction.o
  CCLD   inklingreader
src/gui/mainwindow.o: In function `gui_mainwindow_init':
~/inklingreader-0.8/src/gui/mainwindow.c:142: undefined reference to `gtk_button_new_from_icon_name'
~/inklingreader-0.8/src/gui/mainwindow.c:143: undefined reference to `gtk_button_new_from_icon_name'
~/inklingreader-0.8/src/gui/mainwindow.c:144: undefined reference to `gtk_button_new_from_icon_name'
~/inklingreader-0.8/src/gui/mainwindow.c:145: undefined reference to `gtk_button_new_from_icon_name'
collect2: error: ld returned 1 exit status
make: *** [inklingreader] Erreur 1

Not sure if I did something wrong or not.

roelj commented 9 years ago

Looks like you're compiling with a GTK version older than 3.10. Which distribution are you using, and what is your version of GTK?

xuv commented 9 years ago

Ho yes. Damn. I thought I checked this but I got confused by the version numbers.  I'm running Debian Wheezy, so I have version libgtk 3.4.2 and I thought it was ok because higher than 3.1. But as you point out, it's 3.10.

Do you know of any solution to circumvent this. I used to be able to build previous versions. I still have the 0.6 compiled and running.

roelj commented 9 years ago

Wow, I just realize they haven't updated libgtk. I think it involves some modifications to the source code.

A quick work-around for making some screenshots is starting a LiveCD (or virtual machine) of a distribution with a more recent version of libgtk.. I believe Fedora is one of those distributions.

Sorry for the inconvenience, I will modify the graphical interface this weekend so it will compile fine.

xuv commented 9 years ago

Hey, don't worry. The LiveCD is a good workaround. Didn't think of that. Thx. Don't break your code though, unless you want this to run on Debian stable also.