问题
Although there is a Windows GTK# run-time installer for .NET I have noticed that GTK# applications compiled using MonoDevelop under Linux (built via SlackBuilds so it is pretty fresh) crash on Windows7 if run via double-clicking, whereas if I build the binary using the same project solution using Xamarin Studio for Windows, running via double-clicking is fine. I'm guessing that the MonoDevelop compiled binary does not include stubs needed to use a non-Mono GTK# install.
So: Is it possible to get Linux MonoDevelop to build a GTK# binary that will run with the Windows GTK# .NET runtime on a system without Mono?
Note: Xamarin Studio is on a separate Windows system to the one I am testing the GTK# run-time on, so it is not a case of deployment-testing on a development system..
回答1:
To run your gtk# app compiled in linux with mono, you have to:
- Install Visual C++ 2013 x86 redistributable package
- Install gtk# for .net
回答2:
To run a gtk# app compiled with monodevelop under Linux on Windows I usually need to disable the "gettext" support in the project options GTK# settings. If this checkmark is on you get the Mono.Posix file open error when you start the program in windows.
来源:https://stackoverflow.com/questions/21962131/getting-programs-compiled-with-monodevelop-on-linux-to-work-with-the-gtk-net-r