[webkit-gtk] how to use webkit-gtk with gtkmm3 ?

Nicolas Jäger jagernicolas at legtux.org
Mon Jan 19 21:58:57 PST 2015


Hi,
I try to make a small web browser, I tried this code :

#include <webkit2/webkit2.h>

int main( int argc
        , char **argv
        )
{
  Glib::RefPtr<Gtk::Application> app = Gtk::Application::create( argc,
argv, "" );

  Gtk::Window window;
  window.set_default_size( 800, 600 );

  WebKitWebView * one =  WEBKIT_WEB_VIEW( webkit_web_view_new() );
  GtkWidget * two = GTK_WIDGET( one );
  Gtk::Widget * three = Glib::wrap( two ); 

  window.add( *three );
  webkit_web_view_load_uri(one, "http://www.webkitgtk.org/");

  app->run( window );  
  exit( 0 );
}

compile command :
g++ GTKMM_engine.cc main.cc `pkg-config gtkmm-3.0 --libs --cflags`
`pkg-config webkit-1.0 --libs --cflags` -std=c++11 #include <gtkmm.h>

at running time I got :
(a.out:5637): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x
and GTK+ 3 in the same process is not supported

could you tell me jow to embend webkit into gtkmm ?

also, what is the difference between these two mailing lists :
webkit-gtk and webkit-help ? they both appear on
http://www.webkitgtk.org/ page in the contacts

regards,
/nicoo


More information about the webkit-gtk mailing list