Search code examples
objective-ccmacosdlopen

GC capability mismatch0?


While trying to load a dylib in the project I get following error:

[0x0-0x33033].com.mycompany.testlibload[840] Error: dlopen() -> dlopen(/Users/Test/Desktop/test/libtestlib_64bit.dylib, 2): no suitable image found.  Did find:
[0x0-0x33033].com.mycompany.testlibload[840]    /Users/Test/Desktop/test/libtestlib_64bit.dylib: GC capability mismatch0 . 

Can someone explain me what is the problem and how can I fix it?


Solution

  • I found answer:

    Compiles code to use Garbage Collector write-barrier assignment primitives within the Objective-C runtime. Code is marked as being GC capable. An application marked GC capable will be started by the runtime with Garbage Collection enabled. All Objective-C code linked or loaded by this application must also be GC capable. Code compiled as GC Required is presumed to not use traditional Cocoa retain/release methods and may not be loaded into an application that is not running with Garbage Collection enabled. Code compiled as GC Supported is presumed to also contain traditional retain/release method logic and can be loaded into any application. Garbage Collection is only supported on Mac OS X 10.5 and later. [GCC_ENABLE_OBJC_GC, -fobjc-gc | -fobjc-gc-only]