I'm building a project in which I have built a custom SQLite3 library that I statically link to in all my applications (there's multiple applications in the project). When I build in Release mode, the system's /usr/lib/libsqlite3.0.dylib is magically linked in for no apparent reason (in all the applications I build). This is the otool -L result the Release product for one of the applications:
/Users/rsesek/Projects/Tindex/build/Release/Tindex Server.app/Contents/MacOS/Tindex Server: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 824.34.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 567.23.0) /usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.3)
For some reason in the Ld phase of xcode-build, it ads "-lsqlite3" as a flag. Yet, in Debug mode, this doesn't occur at all. This is the otool -L result for the Debug product:
/Users/rsesek/Projects/Tindex/build/Debug/Tindex Server.app/Contents/MacOS/Tindex Server: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 824.34.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 567.23.0) /System/Library/PrivateFrameworks/ZeroLink.framework/Versions/A/ZeroLink (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.3)
Note that "/usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)" is not present.
I cannot figure out for the life of me why this is happening. I removed the CoreData framework as I thought that could be adding in the library. I've opened up my project.pbxproj in BBEdit and looked for any traces of the library or flag and there is none.
Any help with trying to remove this mysterious /usr/lib/libsqlite3.0.dylib from my Release builds would be helpful. They won't run correctly with it linked-in because it conflicts with my static library.
Thanks,
Robert Sesek www.iris-studios.com
|