1

GTK# Webkit System.DllNotFoundException missing file webkitgtk-1.0.so.0

I written the following GTK# application which compiles successfully, code as below:

using System;
using Gtk;
using GtkSharp;
using WebKit;


namespace gtk_test
{
class Hello {

        static void Main()
        {
                Application.Init (); 

                //MainWindow window = new MainWindow ();
                Window window = new Window ("TEST");
                window.Fullscreen();

                Fixed frmtest=new Fixed();
                frmtest.SetSizeRequest(1280,1024);
                Label test = new Label();
                test.Text = "Hello and Welcome to GTK#";
                Button btnclose = new Button();
                btnclose.SetSizeRequest(100,50);
                btnclose.Clicked +=  btnclose_clicked;
                btnclose.Label = "Exit Program";
                btnclose.TooltipText = "close program!";
                ScrolledWindow scrollWindow = new ScrolledWindow ();;
                scrollWindow.SetSizeRequest(1000,900);
                WebView webView = new WebView ();
                webView.SetSizeRequest(1200,1000);
                webView.Open ("www.bbc.co.uk/sport");
                scrollWindow.Add (webView);
                frmtest.Put(test,10,50);
                frmtest.Put(btnclose,10,75);
                frmtest.Put(scrollWindow,10,100);
                window.Add(frmtest);
                window.Show();
                window.ShowAll();
                Application.Run ();


        }

        static void  btnclose_clicked (object sender, EventArgs e)
        {
            Application.Quit();

        }
}

}

However it crashes with a System.DllNotFoundException error, stating webkitgtk-1.0.so.0 file is missing. I've researched on internet looking for solutions but cannot seem to find any. GTksharp and Webkitsharp has been installed. Does it also need webkitgtk?. I am trying this now! I'm really struggling to find out what I have not installed. Note in /usr/lib64 there is a libwebkit-1.0.so.2 file but not a libwebkit-1.0.so.0 file, should that exist?

Thanks for your help,

Andy

  • NOTE. I am using MonoDevelop. Alternatively I also get the same problem using a gmcs compiler via command line. My operating system is Centos 6.3 Linux. – cool_andy2013 Feb 08 '13 at 15:20
  • If you dont know the answer to this question. Please can someone me point in right direction of using a WebBrowser control in Mono / MonoDevelop for Linux (Centos 6.3). Thank you :) – cool_andy2013 Feb 08 '13 at 17:29

2 Answers2

0

I was using an incorrect version of the DLL file. I compiled Webkit# manually and copied across the DLL from sources.

0

I have also fixed my original installation of webkit-sharp (yum install webkit-sharp*)

I simply changed my config file to (from webkitgtk-1.0.so.0 to webkitgit-1.0.so.2)

<configuration>
     <dllmap dll="webkit-1.0" target="webkitgtk-1.0.so.2"/>
</configuration>

This is so it reads the correct library file instead of webkitgtk-1.0.so.0 which does not exist.