0
votes

I have a running cocos2d project and a running ios storyboard project that both run without errors , when i try to embed cocos2d project into the main project i have the following errors (After disabling ARC and adding required frameworks ):

Undefined symbols for architecture i386: "_gzclose", referenced from: _ccInflateGZipFile in ZipUtils.o "_gzopen", referenced from: _ccInflateGZipFile in ZipUtils.o "_gzread", referenced from: _ccInflateGZipFile in ZipUtils.o "_inflate", referenced from: _inflateMemoryWithHint in ZipUtils.o "_inflateEnd", referenced from: _inflateMemoryWithHint in ZipUtils.o "inflateInit2", referenced from: _inflateMemoryWithHint in ZipUtils.o "_uncompress", referenced from: _ccInflateCCZFile in ZipUtils.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

1
Are you wanting to disable ARC? How are you adding the frameworks?Mark McCorkle

1 Answers

4
votes

Add the libz.dylib library to the Link Binaries build phase or add -lz as other linker flag in Build Settings. Both will ensure the app is linked with the zip library needed by cocos2d.