那麼,我想編譯一個簡單的程序,將WebKit的WebView嵌入到GTK窗口中。所以,當編譯器檢查該行:未定義的參考,WebKitGTK
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,我不知道在哪裏找到這些功能。我會感謝您的幫助!
謝謝!
什麼是您的鏈接器命令行?你使用'pkg-config --libs webkitgtk-3.0'嗎? – ptomato