Note that there are some explanatory texts on larger screens.

plurals
  1. POCompiler error when attempting to link static C++ library to MonoDevelop
    primarykey
    data
    text
    <p>I created a very simple C++ library in xcode, it was basically:</p> <pre><code>//Numbers.h class Numbers { public: int Get10(); } //Numbers.cpp int Numbers::Get10() { return 10; } </code></pre> <p>I compiled it to a static (debug) library then carefully followed <a href="http://monotouch.net/index.php?title=Documentation/Linking_Native_Libraries&amp;highlight=static%20library" rel="nofollow">the instructions here</a> up until step 2, I couldn't progress further because the code won't compile anymore, this is basically what the compiler outputs before giving me the 'mtouch failed with no output' message:</p> <blockquote> <p>/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</p> </blockquote> <p>I very strongly suspect the compiler is not able to find libLogger.a because if I changed libLogger.a to something like abc.a (which doesn't exist) I get the same problem. I do know for sure that libLogger.a exists in the directory specified directory under MyCode/ChicksnVixens/ and it is included in the source hierarchy.</p> <p>Any ideas on how to fix this? I kind of suspect maybe it has something to do with me using xcode 4 to compile it?</p> <p>Or the problem could be the arguments I'm passing in:</p> <pre><code>-gcc_flags "-L${ProjectDir} -lMylibrary -cxx -force_load ${ProjectDir}/libLogger.a" </code></pre> <p>I had to add 'cxx' as per the instructions but maybe I'm doing something wrong without seeing it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload