好吧,我正在尝试编译一个简单的程序,将WebKit的WebView嵌入到GTK窗口中。所以,当编译器检查这一行时:
webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
它给了我一些错误:
/usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `cairo_gl_surface_get_width'
/usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `cairo_egl_device_create'
/usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `soup_message_set_priority'
/usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `hb_icu_get_unicode_funcs'
/usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `cairo_glx_device_create'
/usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `cairo_gl_surface_get_height'
/usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `cairo_gl_device_set_thread_aware'
/usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `cairo_gl_surface_create_for_texture'
/usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `hb_icu_script_to_script'
collect2: error: ld returned 1 exit status
make[2]: ** [dist/Debug/GNU-Linux-x86/webkittest] Erro 1
make[2]: Saindo do diretório `/home/todi/Projetos/Cpp/WebKitTest'
make[1]: ** [.build-conf] Erro 2
make[1]: Saindo do diretório `/home/todi/Projetos/Cpp/WebKitTest'
make: ** [.build-impl] Erro 2
是的,我已经在链接器中对lib进行了引用,我不知道在哪里可以找到这些函数。我很感激你的帮助!
谢谢!
答案 0 :(得分:0)
这是在webkit-gtk的更高版本中修复的。请参阅https://bugs.webkit.org/show_bug.cgi?id=108174:降级harfbuzz以编译此版本的webkit-gtk,或将webkit-gtk升级到lastets版本(适用于2.4.3)
答案 1 :(得分:0)
使用
编译harfbuzzsudo ./configure --with-icu sudo make sudo make istall
然后使用
编译cairosudo ./configure --enable-gl --includedir =" / usr / include /" --libdir ="在/ usr /共享/ lib中"
sudo make
sudo make install