To solve the problem gtk2 development library must be installed. Under CentOS this can be done with:
yum groupinstall "Development Tools"
yum install gtk+-devel gtk2-devel
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for mono... /usr/local/bin/mono
checking for gmcs... /usr/local/bin/gmcs
checking for update-mime-database... /usr/bin/update-mime-database
checking for pkg-config... /usr/bin/pkg-config
checking for msgfmt... /usr/bin/msgfmt
checking for msgmerge... /usr/bin/msgmerge
checking pkg-config is at least version 0.9.0... yes
checking for UNMANAGED_DEPENDENCIES_MONO... yes
checking for mono... /usr/local/bin/mono
checking for dmcs... /usr/local/bin/dmcs
checking for MONO_ADDINS... yes
checking for MONO_ADDINS_SETUP... yes
checking for MONO_ADDINS_GUI... yes
checking for GLIB_SHARP... yes
checking for GTK_SHARP... yes
checking for GLADE_SHARP... yes
checking for MONODOC... yes
checking for GNOME_SHARP... no
checking for GNOME_VFS_SHARP... no
checking for GCONF_SHARP... no
configure: error: Cannot enable GNOME platform without gnome-sharp-2.0
====================================================================
下载 gnome-sharp-2.0 并安装
下载地址: http://download.mono-project.com/sources/gnome-sharp220/
# tar jxvf gnome-sharp-2.20.1.tar.bz2
# cd gnome-sharp-2.20.1
# ./configure --prefix=/usr/local
虽然没有报错,但是提示缺少3个assmely: art-sharp.dll,gnomevfs-sharp.dll,gnome-sharp.dll
====================================================================
Configuration summary
* Installation prefix = /usr/local
* C# compiler: /usr/local/bin/mcs -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 -define:GNOME_SHARP_2_20
Optional assemblies included in the build:
* art-sharp.dll: no
* gnomevfs-sharp.dll: no
* gnome-sharp.dll: no
NOTE: if any of the above say 'no' you may install the
corresponding development packages for them, rerun
autogen.sh to include them in the build.
gnome-sharp.dll requires libgnomecanvas, libgnome,
libgnomeui, libgnomeprint, libgnomeprintui, and
libpanelapplet.
====================================================================
下面的两个dll对应如下库:(我是通过 yum找到的)
art-sharp.dll : libart_lgpl-devel
gnomevfs-sharp.dll: gnome-vfs2-devel
最后一个根据上面的提示,(对应如下库)
gnome-sharp.dll : libgnomecanvas, libgnome,
libgnomeui, libgnomeprint, libgnomeprintui, and
libpanelapplet(即gnome-panel-devel)
# make
make 后,报出如下错误:
====================================================================
error CS0006: Metadata file `Mono.GetOptions.dll' could not be found
====================================================================
经过调查,
1. 原来是gnome-sharp版本太旧的原