I use swig 2.0.1 + mono 2.6/2.8 on Mac OS X 10.6.4.
The overall build is OK, and the build of the C# examples is also OK. The problem is that when I run the example
System.DllNotFoundException: example
It looks like it cannot find your unmanaged dll: "example".
You should also ensure the file is in the dynamic linker search path, i.e. on MacOS:
export DYLD_FALLBACK_LIBRARY_PATH="/directory/with/your/dylb/file:$DYLD_FALLBACK_LIBRARY_PATH"
BTW, MacOS one would generally expect a .dylib file, not a .so file.
This is likely caused by the library being compiled as 64-bit. The "(null)" means that Mono was not able to obtain the error message of this error. You can fix this by setting the appropriate compile flags. For instance:
./configure CFLAGS="-O -arch i386" CXXFLAGS="-O -arch i386" LDFLAGS="-arch i386" --disable-dependency-tracking
You may also be able to fix this by using Mono's experimental 64-bit support but I have never done that so am not sure.
You can specify what DLL the pinvoke signatures target in your interface file.