Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 11th, 2005, 11:09 AM   #1
pr0gm3r
Hobbyist Programmer
 
Join Date: Dec 2004
Location: CA
Posts: 102
Rep Power: 4 pr0gm3r is on a distinguished road
Send a message via MSN to pr0gm3r
Mono Runtime error.

Hi All,

I am trying to run my "Stocks.cs" applications using mono but it gave me the following error below:

Note: I have set the library as describe and insturcted by mono and my other C# applications is working.

Note: I am using the following library in my "Stocks.cs": System, System.Drawing, System.Forms.

Note: I am curently using the Current Stable Version: Mono 1.1.9.1

Code error show in SuSE 9.3 Pro:
Unhandled Exception: System.DllNotFoundException: gdiplus
in (wrapper managed-to-native) System.Windows.Forms.XplatUIX11:GetFontMetrics (intptr,intptr,int&,int&)
in <0x00034> System.Windows.Forms.XplatUIX11:GetFontMetrics (System.Drawing.Graphics g, System.Drawing.Font font, System.Int32 ascent, System.Int32 descent)
in <0x0001e> System.Windows.Forms.XplatUI:GetFontMetrics (System.Drawing.Graphics g, System.Drawing.Font font, System.Int32 ascent, System.Int32 descent)
in <0x00325> System.Windows.Forms.Line:RecalculateLine (System.Drawing.Graphics g, System.Windows.Forms.Document doc)
in <0x0009c> System.Windows.Forms.Document:RecalculateDocument (System.Drawing.Graphics g, Int32 start, Int32 end, Boolean optimize)
in <0x00017> System.Windows.Forms.Document:RecalculateDocument (System.Drawing.Graphics g)
in <0x00026> System.Windows.Forms.Document:owner_HandleCreated (System.Object sender, System.EventArgs e)
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
in <0x00023> System.Windows.Forms.Control:OnHandleCreated (System.EventArgs e)
in <0x0000d> System.Windows.Forms.TextBoxBase:OnHandleCreated (System.EventArgs e)
in <0x0000d> System.Windows.Forms.TextBox:OnHandleCreated (System.EventArgs e)
in <0x0016d> System.Windows.Forms.Control:CreateHandle ()
in <0x0000a> System.Windows.Forms.TextBoxBase:CreateHandle ()
in <0x00027> System.Windows.Forms.Control:get_Handle ()
in (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:get_Handle ()
in <0x0004f> System.Windows.Forms.Document:PositionCaret (System.Windows.Forms.Line line, Int32 pos)
in <0x0030c> System.Windows.Forms.TextBoxBase:set_Text (System.String value)
in <0x0000d> System.Windows.Forms.TextBox:set_Text (System.String value)
in <0x003f6> Stocks.MainForm:InitializeComponent ()
in <0x00013> Stocks.MainForm:.ctor ()
in (wrapper remoting-invoke-with-check) Stocks.MainForm:.ctor ()
in <0x00018> Stocks.MainForm:Main (System.String[] args)



Please let me know if you having the same error and how to resolved this runtime error. I cound't find the answer to fix this runtime error.

Thank you in advance
__________________
--
pr0gm3r
pr0gm3r is offline   Reply With Quote
Old Oct 11th, 2005, 11:37 AM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
do you have all of the DLLs and such in place.. particularly "gdiplus" ?
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Oct 11th, 2005, 11:42 AM   #3
pr0gm3r
Hobbyist Programmer
 
Join Date: Dec 2004
Location: CA
Posts: 102
Rep Power: 4 pr0gm3r is on a distinguished road
Send a message via MSN to pr0gm3r
Yep... becaues my other C# applications are able to run except for this one... not sure why it cosing that...

here what I think:
1. They are not done implementing TextBox or other Windows.Forms.

Thank your help guys
__________________
--
pr0gm3r
pr0gm3r is offline   Reply With Quote
Old Oct 11th, 2005, 12:59 PM   #4
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,649
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
yeah I dont think WinForms is done completed in mono yet. So That is quite possibly your problem. they recommend using GTK# since that is working and winforms is not yet. as far as I know anyway
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old Oct 11th, 2005, 2:37 PM   #5
Simon Gray
Programmer
 
Join Date: Aug 2005
Location: Ålsgårde, Denmark
Posts: 62
Rep Power: 4 Simon Gray is on a distinguished road
Send a message via MSN to Simon Gray
Winforms is still being actively developed on, I don't think it's near being done yet.

In the beginning they used GTK+ to render the widgets, then they changed to WINE and just recently they abandoned that and started implementing everything in low level drawing.

http://svn.myrealbox.com/blog/

Anyway, there is always GTK#!
__________________
Visit my blog, about all that stuff in between your nostrils >_>
Simon Gray is offline   Reply With Quote
Old Oct 11th, 2005, 6:17 PM   #6
pr0gm3r
Hobbyist Programmer
 
Join Date: Dec 2004
Location: CA
Posts: 102
Rep Power: 4 pr0gm3r is on a distinguished road
Send a message via MSN to pr0gm3r
Thank you guys.. hmm.. I have to do more research on GTK# ^__^
__________________
--
pr0gm3r
pr0gm3r is offline   Reply With Quote
Old Oct 12th, 2005, 9:04 AM   #7
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
GTK# has a bit of a learning curve. However once you get the hang of coding with it, it's quite powerful.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Oct 12th, 2005, 11:39 AM   #8
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4 OpenLoop is on a distinguished road
i had the same problem you discribed earlier, turned out i don't have libgdiplus installed.
OpenLoop is offline   Reply With Quote
Old Oct 12th, 2005, 3:10 PM   #9
pr0gm3r
Hobbyist Programmer
 
Join Date: Dec 2004
Location: CA
Posts: 102
Rep Power: 4 pr0gm3r is on a distinguished road
Send a message via MSN to pr0gm3r
Actually I also add the /opt/mono-1.1.9/lib/ to $LD_LIBRARY_PATH

I think it cost problems;

Some of my apps is working and some are not working. (only when I use MWF)

I uninstalled and reinstalled the Mono 1.1.9.1.

Fixing the library:

create symbolic link of libgdiplus.so in /usr/local/usr and address where my "[path]/mono[version]/lib" directory install

ln -s [path]/mono[version]/lib/libgdiplus.so   
 /usr/local/lib/libgdiplus.so

and then add /usr/local/lib in the /etc/ld.so.conf
run ldconfig (as root)

everything is perfect... now.. I am able to view my GUI Stocks.exe in Linux

Thank you guys for your sugestions and helps
__________________
--
pr0gm3r
pr0gm3r is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:55 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC