Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-16-2008, 04:57 AM   #1
Registered: Nov 2006
Location: Vancouver, BC
Distribution: Slackware
Posts: 102

Rep: Reputation: Disabled
Thumbs down Mono configuration problems, GTK# and WinForms don't work

Thought I'd test out Mono and it wasn't a very good experience, at all.

Running Fedora 8 (x86_64), installed MonoDevelop and dependencies, of course. I've googled this thing to death and other people seem to be running into the exact same issues, but nobody wants to post a solution.

Here's one that really baffles me... Created a new GTK# project which is supposed to open an empty window and that's all. Well it doesn't even compile.
The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference?(CS0246)
Project gtk-sharp and gtk-sharp2 are installed and "gtk-sharp" included in project references. (I've also tried setting the runtime version to both 1.1 and 2.0)
$ gacutil -l | grep gtk-sharp
gtk-sharp, Version=, Culture=neutral, PublicKeyToken=35e10195dab3c99f
gtk-sharp, Version=, Culture=neutral, PublicKeyToken=35e10195dab3c99f
policy.2.4.gtk-sharp, Version=, Culture=neutral, PublicKeyToken=35e10195dab3c99f
policy.2.6.gtk-sharp, Version=, Culture=neutral, PublicKeyToken=35e10195dab3c99f
policy.2.8.gtk-sharp, Version=, Culture=neutral, PublicKeyToken=35e10195dab3c99f
Not even sure where to go from here...

Second one is that WinForms applications compile, but die at runtime.
using System;
using System.Windows.Forms;

namespace WinFormsTest
	public class Program
		public static void Main()
			Form form = new Form();
and when executed
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.Form ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: gdiplus.dll
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x0006c] in /builddir/build/BUILD/mono- --- End of inner exception stack trace ---

... [not important long part removed]

  at <0x00000> <unknown method>
  at WinFormsTest.Program.Main () [0x00000] in /home/serguei/Projects/WinFormsTest/WinFormsTest/Program.cs:11
I've read that rerunning ldconfig fixes this problem, but it's been cached the whole time
$ /sbin/ldconfig -p | grep gdiplus (libc6,x86-64) => /usr/lib64/ (libc6) => /usr/lib/
I reinstalled Mono and MonoDevelop twice from Fedora's repository now so it's probably not a broken installation. Any ideas on how to proceed here??
Old 03-18-2008, 01:29 AM   #2
LQ Newbie
Registered: Sep 2004
Distribution: Fedora Core 2
Posts: 5

Rep: Reputation: 0
Same Issue

I am having what seems to be exactly the same issue with mono. Could there be a problem with the configuration in the RPMs?

Fedora 8 (x86_64), literally identical error messages.
Old 05-08-2008, 11:09 PM   #3
Registered: May 2006
Location: Bayern, Germany
Distribution: Many
Posts: 224

Rep: Reputation: 41
Thumbs down

I'm having the same problem! Using Fedora 8 i386... Any help ?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Windows.Forms (winforms) on MonoDevelop ordealbyfire83 Linux - Software 2 08-05-2007 08:37 PM
will mono work on slackware? rhythmking Slackware 3 06-04-2005 04:56 PM
Installing Mono-got stuck while installing gtk-sharp chutsu Linux - Software 11 01-18-2005 09:25 PM
does Mono.NET work on KDE? Cavenaghi Linux - Software 6 10-28-2004 05:40 AM
Mono + unixOdbc does not seem to work paulecoyote Programming 0 10-12-2004 05:22 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration