您好我正在尝试编译inkscpae但它需要gtkmm, 所以我下载了它并尝试编译它,但是我收到了这个错误
./ configure --prefix = $ HOME / Local / gtkm CPPFLAGS =" -I $ HOME / Local / gc-7.4.2 / include -I $ HOME / Local / gtkmm / include" LDFLAGS =" -L $ HOME / Local / gcFiles / lib -L $ HOME / Local / gtkmm / lib"
libtool: compile: g++ -DHAVE_CONFIG_H -I.. -I../.. -DG_LOG_DOMAIN=\"gdkmm\" -DGDKMM_BUILD=1 -pthread -pthread -I/home/users/oren.amsalem/Local/gtkmm/include/giomm-2.4 -I/home/users/oren.amsalem/Local/gtkmm/lib/giomm-2.4/include -I/home/users/oren.amsalem/Local/gtkmm/include/glibmm-2.4 -I/home/users/oren.amsalem/Local/gtkmm/lib/glibmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/users/oren.amsalem/Local/gc-7.4.2/include -I/home/users/oren.amsalem/Local/gtkmm/include -Wall -g -O2 -MT window.lo -MD -MP -MF .deps/window.Tpo -c window.cc -fPIC -DPIC -o .libs/window.o
window.cc: In static member function 'static void Gdk::Window::constrain_size(const Geometry&, guint, int, int, int&, int&)':
window.cc:950:117: error: invalid conversion from 'guint {aka unsigned int}' to 'GdkWindowHints' [-fpermissive]
In file included from /usr/include/gtk-3.0/gdk/gdktestutils.h:26:0,
from /usr/include/gtk-3.0/gdk/gdk.h:55,
from ../gdkmm/color.h:36,
from ../gdkmm/dragcontext.h:30,
from ../gdkmm/window.h:31,
from window.cc:9:
/usr/include/gtk-3.0/gdk/gdkwindow.h:1049:12: error: initializing argument 2 of 'void gdk_window_constrain_size(GdkGeometry*, GdkWindowHints, gint, gint, gint*, gint*)' [-fpermissive]
Makefile:572: recipe for target 'window.lo' failed
make[2]: *** [window.lo] Error 1
make[2]: Leaving directory '/home/users/oren.amsalem/Local/gtkmm-3.10.1/gdk/gdkmm'
Makefile:744: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/users/oren.amsalem/Local/gtkmm-3.10.1'
Makefile:529: recipe for target 'all' failed
make: *** [all] Error 2
任何想法是什么问题?
我没有看到依赖性问题。
谢谢你, 奥伦。
答案 0 :(得分:0)
我猜您的GTK +版本比gtkmm版本更新或更旧。你似乎使用gtkmm-3.10.1所以你的GTK +版本应该是GTK + 3.10.something。如果您的GTK +更新,请尝试使用相应的gtkmm版本。当然,如果这意味着您需要自己更新其他依赖项,那可能会很困难 - 从源代码构建总是很困难。
GTK + C API中的这些小变化并不罕见,C ++编译器会更多地注意到这一点。但我们保持gtkmm与GTK +同步。