How-to: Setting up Mono on Mac OS X, Part Three

Part 3 of a series; see Part Two here

Continued from Part Two

The actual problem, and its solution

After spending way too much time on a wild goose chase, it finally occurred to me to do what I should have done in the first place: hit the Mono website harder for a solution. I looked through the output of the failed attempts to build the Windows Forms and Gtk# versions of the samples on that first page. I found a stack trace, and followed through the chain of exceptions to the final one–actually, the first one to occur, as they are listed from outer (last) exception to inner (first)–likely the root cause. There was a message that contained the text "libgdiplus.dylib". This looked promising, as it had the sound of a system library that was perhaps missing or corrupted. So I started poring over the website, looking for the above text, or anything related to problems getting started with Mono on OS X.

After getting nowhere with the FAQ, I started poking around in the Mono forums. I had to wade through nearly a hundred entries with no success, before I found someone with a similar error message, including the stacktrace error with "libgdiplus.dylib" mentioned. And what was the suggested solution? "Install X11." X11 is the XWindows subsystem, Unix’s original GUI/Windowing system. I had previously noted that X11 was a pre-requisite, but I had scanned quickly through the hard drive of the Mac, and was pretty sure I had seen some X11 folders somewhere…Yep. I made a classic mistake. I assumed I already had a pre-requisite, and didn’t check. The next

step was obvious…

Installing X11 on OS X

A quick Google turned up the following page: How to Install X11 in OS X. Oh, good! It’s already on the OS X discs! I don’t have to wade through another Open-Source "installation"! Grab the disc, follow the instructions…yep, X11 is not selected! OK, go ahead and install…open up a Terminal window…re-run the Windows Forms build commands, and run the .exe…BAM!! It works! Try the Gtk# build/run…it works too! NOW I can open the bubbly!! Success!

The moral of the story is obvious: when you find that the very first steps of a newly-downloaded development tool or package just flat-out aren’t working, stop, take a deep breath…and check the documentation, the FAQ, Google it…because, if you stop to think about it, it doesn’t make sense that you’d hit a show-stopper that early in the process. I let my previous experiences with less-than-polished open source software color my thought process, and I paid for it with several hours of wasted time.

At least I have these cool new Developer Tools from Apple to play with to make me feel better… 😉

Currently listening to: Johnny Cash – Hello I’m Johnny Cash (Disc 1) – A Boy Named

  1. #1 by JH on August 13, 2015 - 4:39 am

    Thank you

  2. #2 by nikon coolpix s4100 on December 8, 2011 - 9:58 am

    Thank god some bloggers can write. Thank you for this writing..

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: