On OS X, Mono is typically 32-bit, and installing through either MacPorts or a source build will yield a 64-bit binary. This could very well be the source of the problem, and you can check by setting export MONO_LOG_LEVEL=debug
. If you see something along the lines of this:
Mono: DllImport error loading library 'dlopen(/usr/local/lib/libSdl-2.0.0.dylib, 9): no suitable image found.
Did find: /opt/local/lib/libSdl-2.0.0.dylib: mach-o, but wrong architecture'.
then this is your problem right here. Compile SDL2 from source in 32-bit mode like so:
$ export CFLAGS="-arch i386"
$ export LDFLAGS="-arch i386"
$ ./configure
$ make
and to just to make sure that it's right, run:
$ file build/.libs/libSDL2-2.0.0.dylib
which should result in:
$ build/.libs/libSDL2-2.0.0.dylib: Mach-O dynamically linked shared library i386
Now just make install
, and you should be good to go!