MKBundled Mono Exe checking for Dependency in Libr

2020-07-17 04:47发布

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

enter image description here

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?

0条回答
登录 后发表回答