简体   繁体   English

使用.Net运行MonoDev中制作的gtk#应用程序

[英]Running an gtk# Application made in MonoDev with .Net

Right now I am trying to learn how to use gtk# and Xamarin studio , but after I create the .EXE I cant run it with .NET. 现在,我正在尝试学习如何使用gtk#和Xamarin Studio,但是在创建.EXE之后,无法使用.NET运行它。 I am really new to C# and I have no idea what my program needs to work in .Net , It runs fine in mono but I would just like to see if It could work without mono . 我真的是C#的新手,我不知道我的程序需要在.Net中运行什么,它在mono中可以正常运行,但是我想看看如果没有mono可以运行。

When I try to run the Exe from cmd I get this 当我尝试从cmd运行Exe时,我得到了

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'libgtk-win
32-2.0-0.dll': The specified procedure could not be found. (Exception from HRESU
LT: 0x8007007F)
   at Gtk.Application.gtk_init(Int32& argc, IntPtr& argv)
   at Gtk.Application.Init()
   at Notepad.Notepad.Main(String[] args)

The program I was trying to create is just a clone of notepad made in gtk# . 我试图创建的程序只是gtk#制作的记事本的克隆。

If you are running the GTK# app on a different machine than the one you used to develop, then you need to have the following dependencies installed in order for your app to run perfectly: 如果要在与用于开发的机器不同的机器上运行GTK#应用程序,则需要安装以下依赖项才能使应用程序完美运行:

  1. The .NET Framework Runtime for the version you are targetting (either mono or ms, both are fine) 您要定位的版本的.NET Framework运行时(mono或ms,都可以)

  2. The GTK# Framework (You can find it here: http://download.xamarin.com/Installer/gtk-sharp-2.12.20.msi ) GTK#框架(您可以在这里找到它: http : //download.xamarin.com/Installer/gtk-sharp-2.12.20.msi

  3. GTK+ Libraries: GTK# is a binding to GTK+ and not a full port of it. GTK +库:GTK#是GTK +的绑定,而不是它的完整端口。 So you also need the GTK+ libraries from http://www.gtk.org/download/win32.php 因此,您还需要http://www.gtk.org/download/win32.php中的GTK +库

Notes: 笔记:

In case of point 2, you can optionally include the gtk# msi as part of your installation package. 对于第2点,您可以选择将gtk#msi作为安装软件包的一部分。 In case of 3, you can either download the full gtk+ bundle (consisting of glade and other 3rd party libraries) or just the individual runtime dlls for gtk, gdk, pango, etc for a minimalist installation. 在3的情况下,您可以下载完整的gtk +捆绑包(由glade和其他第三方库组成),也可以仅下载gtk,gdk,pango等的单个运行时dll,以进行简约安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM