I have bundled an Exe with Mono in Mac using
export AS="as -arch i386"
export CC="cc -arch i386 -framework CoreFoundation -lobjc -liconv"
export PATH=/Library/Frameworks/Mono.framework/Versions/4.0.3/bin:$PATH
mkbundle -- static myapp.exe MonoMac.dll --deps -o myapp
It successfully produces the native application myapp. I copied the lib directory from mono folder and pasted it on desktop because the app uses GTK for User Interface.
I'm trying to launch the application using the following script.sh
VAR=`pwd`
export DYLD_FALLBACK_LIBRARY_PATH="$VAR/lib:/usr/lib"
./myapp
The app successfully launches provided that Mono is installed in Library folder if i remove Mono.Framework from the Library Folder i get the following error
My question is isn't the static Flag used to include Mono Runtime with the Exe and produce a non dependent Native code(Except GTK for which i have set the DYLIB Path),Why is it looking for Mono in the Library Folder?