2 Replies - 851 Views - Last Post: 12 February 2013 - 10:29 AM Rate Topic: -----

#1 coolandy  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 15
  • Joined: 23-September 11

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

Posted 09 February 2013 - 03:12 PM

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

Hi,

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?

By the way 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.
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).

Thanks for your help,

Andy

Is This A Good Question/Topic? 0
  • +

Replies To: GTK# Webkit System.DllNotFoundException missing:webkitgtk-1.0.so.0

#2 coolandy  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 15
  • Joined: 23-September 11

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

Posted 12 February 2013 - 09:26 AM

I have solved this by compiling WebKit sharp manually and copying accross the correct version of DLL. I took this from the example FunnyBrowser.cs.
Was This Post Helpful? 1
  • +
  • -

#3 coolandy  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 15
  • Joined: 23-September 11

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

Posted 12 February 2013 - 10:29 AM

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1