Search code examples
iosobjective-cxcodexcode5build-error

libsqlite3.dylib is a dynamic library, not added to the static library


I've updated the project from xCode 4 to xCode 5.1. And now I get the following error on build:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/lib/libsqlite3.dylib is a dynamic library, not added to the static library

How can I fix it? I've tried to find any special build parameters (including -ObjC) but all of them are standard.


Solution

  • The answer is similar to the duplicated question Xcode -dynamic not specified static library error :

    Just remove libsqlite3.dylib from the own static library on the project.