Mono: can my GTK-app be executed on Windows-64bit?

Viewed 928

I have created an Application in Linux 64bit with MonoDevelop, GTK#2 as GTK2-Project.

I am able to make an executable, the platform-target is "AnyCPU" (I have removed Posix references and GetText()-support), but I have also tried "x64".

  1. This executable can be executed on Linux 64bit (terminal: mono App.exe)
  2. This executable can be executed on Windows 32bit (terminal: mono App.exe)
  3. This executable CANNOT be run on Windows 64bit (terminal: mono App.exe) brings error:

Unhandled Exception: System.DllNotFoundException: libglib-2.0-0.dll

I have installed the GTK+ for Windows Runtime Environment on both machines, Windows 32bit and Windows 64bit.

In fact I have found this DLL libglib-2.0-0.dll on the GTK/bin-path and also have copied it to my executable-folder, even though it is set in the PATH environment variable.

Anyway, I get the same error message, but only in Windows 64bit.

Do I have a chance of making my GTK app to be running with Windows 64bit?

Is there a different libglib-2.0-0.dll for Windows x64 and how can I obtain this?

1 Answers

It's certainly possible to run a Gtk# 2 application on 64-bit windows, but it requires a bit of work. It appears you've already obtained the necessary .Net assemblies, and the native Win64 Gtk+ DLLs that are needed, but you also need an additional set of 64-bit native "glue" DLLs. I have not yet found a good source for these in pre-compiled form in any of my searches, but it is possible to build them from the gtk-sharp source.

Related