iphone - Compiler error when attempting to link static C++ library to MonoDevelop -
iphone - Compiler error when attempting to link static C++ library to MonoDevelop -
i created simple c++ library in xcode, basically:
//numbers.h class numbers { public: int get10(); } //numbers.cpp int numbers::get10() { homecoming 10; }
i compiled static (debug) library followed the instructions here until step 2, couldn't progress farther because code won't compile anymore, compiler outputs before giving me 'mtouch failed no output' message:
/developer/platforms/iphonesimulator.platform/developer/usr/bin/gcc-4.2 -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=4.3 -isysroot /developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator4.3.sdk /var/folders/-m/-mb3z8vagiqk88qev-fxk++++ti/-tmp-/tmp216a96e0.tmp/main.x86.o -o /var/folders/-m/-mb3z8vagiqk88qev-fxk++++ti/-tmp-/tmp216a96e0.tmp/chicksnvixens -framework cfnetwork -framework foundation -framework opengles -framework uikit -framework audiotoolbox -framework quartzcore -framework corefoundation -framework coregraphics -framework audiotoolbox -lz -u _mono_pmip -u _createzstream -u _closezstream -u _flush -u _readzstream -u _writezstream -liconv -lmono-2.0 -lmonotouch -l/developer/monotouch/sdks/monotouch.iphonesimulator.sdk/usr/lib -u _catch_exception_raise -l/users/ahmedhakeem/documents/projects/goodjabberengine/mycode/chicksnvixens -lmylibrary -cxx -force_load /users/ahmedhakeem/documents/projects/goodjabberengine/mycode/chicksnvixens/liblogger.a
i suspect compiler not able find liblogger.a because if changed liblogger.a abc.a (which doesn't exist) same problem. know sure liblogger.a exists in directory specified directory under mycode/chicksnvixens/ , included in source hierarchy.
any ideas on how prepare this? kind of suspect maybe has me using xcode 4 compile it?
or problem arguments i'm passing in:
-gcc_flags "-l${projectdir} -lmylibrary -cxx -force_load ${projectdir}/liblogger.a"
i had add together 'cxx' per instructions maybe i'm doing wrong without seeing it?
i believe arguments you're passing in, perhaps try:
-gcc_flags "l${projectdir} -llogger -cxx -force_load ${projectdir}/liblogger.a"
(assuming still called liblogger) - it's trying load libmylibrary
you're pointing @ liblogger
.
iphone mono xcode4 monotouch monodevelop
Comments
Post a Comment