开发者

GTK# + WebKit + Windows

I have developed a GTK# application that makes use of webkit-sharp to edit email templates. This application works in Linux but when it is run in Windows it does not work. I am using the webkit-sharp.dll from Linux in Windows. The error that I am getting is:

    System.TypeInitializationException: The type initializer for 'WebKit.WebView' threw an exception. ---> System.DllNotFoundException: Unable to load DL开发者_如何学JAVAL 'webkit-1.0': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at WebKit.Download.webkit_download_get_type()
   at GtkSharp.WebkitSharp.ObjectManager.Initialize()
   at WebKit.WebView..cctor()
   --- End of inner exception stack trace ---
   at WebKit.WebView..ctor()
   at MainWindow..ctor()

I am guessing that webkit-sharp.dll only wraps the native libraries for WebKit. I do not know where to get "webkit-1.0". Is there a webkit-sharp.dll that is specific to Windows for GTK#?


I did exactly that. I guess the webkit windows dll does not use gtk as rendering engine. What I did was install the libwebkit dll provided by the suse mingw32 port and all of its dependencies.

You can see a full list of dependencies here

At the time of doing it(1 year ago more or less) the rendering was not perfect, but it may have improved.


I'm also having this problem...

Not tried this, but at http://www.webkit.org/building/checkout.html

The site suggests:

  1. Download webkit support libraries
  2. Run the update-webkit script
  3. Build webkit from source

I think this requires cygwin installed.

I'm just paraphrasing the site - not tried this yet.


Have you tried running the Hello World example app to make sure everything is set up correctly in your Windows environment?

http://mono-project.com/Mono_Basics

You can also try some of the other example programs to make sure they function without error.

http://www.mono-project.com/GtkSharpBeginnersGuide

Seems like a common installation issue requires the addition of an environment variable in windows to get the assemblies loaded correctly:

http://www.mono-project.com/FAQ:_General#Installation_Problems

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜