c++ - Link mono in XCode -
i trying embed mono runtime in c++ os x console app (will used scripting logic in home-brew game engine, unity3d). using xcode ide , failing spectacularly @ linking mono libraries. come dark side (windows) , new mac libraries , xcode.
i have built mono , referenced header folder slew of apple-moch-o linkers errors no matter .a add project. have built sample project https://github.com/inkdev/embedded-mono-sample windows. mono site on topic http://www.mono-project.com/embedding_mono confusing , of little use me.
help hugely appreciated.
edit: if remember correctly, followed these commands http://www.mono-project.com/compiling_mono_on_osx , got source here: https://github.com/mono/mono/tree/master/mono, , used make , make install. added /mono/include... folder xcode's "header search path" , resolved unfound includes. under /mono/lib/ have tried several different *.dynlib files ( drag them xcode ) none have worked. libmono-2.0.1.dylib says "..file built unsupported file format..", , libmonoboehm-2.0.dylib says "...undefined symbols architecture x86_64..."
to in future wants compile , link mono runtime in xcode, here steps followed.
- grab/extract latest *.tar.gz from: http://download.mono-project.com/sources/mono/
- follow these instructions: http://www.mono-project.com/compiling_mono_on_osx
- open
/mono
, drag/mono/lib/libmono-x.x.dylib
xcode project ( make sure adde target ). - in xcode, select project, select target, select build settings.
- search "header search paths" , add:
/mono/include/mono-x.x
- use source code test out: https://github.com/inkdev/embedded-mono-sample
- you may need copy
/mono/etc/mono/x.x
/mono
fix runtime error.
all monos belong now, enjoy.
Comments
Post a Comment