LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 03-16-2008, 03:57 AM   #1
GamerX
Member
 
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.
Code:
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)
Code:
$ gacutil -l | grep gtk-sharp
gtk-sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f
gtk-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f
policy.2.4.gtk-sharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f
policy.2.6.gtk-sharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f
policy.2.8.gtk-sharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f
Not even sure where to go from here...


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

namespace WinFormsTest
{
	public class Program
	{
		public static void Main()
		{			
			Form form = new Form();
			
			Application.Run(form);
		}
	}
}
and when executed
Code:
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-1.2.5.1/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs:107 --- 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
Code:
$ /sbin/ldconfig -p | grep gdiplus
        libgdiplus.so.0 (libc6,x86-64) => /usr/lib64/libgdiplus.so.0
        libgdiplus.so.0 (libc6) => /usr/lib/libgdiplus.so.0
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, 12:29 AM   #2
Flunk
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, 10:09 PM   #3
goossen
Member
 
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 ?
 
  


Reply


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 07:37 PM
will mono work on slackware? rhythmking Slackware 3 06-04-2005 03:56 PM
Installing Mono-got stuck while installing gtk-sharp chutsu Linux - Software 11 01-18-2005 08:25 PM
does Mono.NET work on KDE? Cavenaghi Linux - Software 6 10-28-2004 04:40 AM
Mono + unixOdbc does not seem to work paulecoyote Programming 0 10-12-2004 04:22 AM


All times are GMT -5. The time now is 11:46 PM.

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