How make app use static sqlite in its package, instead of dylib
How make app use static sqlite in its package, instead of dylib
- Subject: How make app use static sqlite in its package, instead of dylib
- From: Jerry Krinock <email@hidden>
- Date: Sun, 19 Dec 2010 21:01:49 -0800
I need an app to use the latest sqlite 3.7.4 instead of sqlite 3.6.12 which is included as a dylib in Mac OS 10.6. Previous versions of this app have used the dylib.
So, I got the latest sqlite source code, built an libsqlite3.a, added it to the target, and unchecked libsqlite3.dylib. This resulted in the dylib being removed from my Link Binary With Libraries build phase and the static lib added to it. According to my read of the Xcode Build System Guide ▸ Linking ▸ Specifying the Search Order of External Symbols, this should cause my static library to be linked instead of the dylib. I also added libsqlite3.a to a Copy Files Build Phase so that it is copied into Contents/MacOS of the product.
Clean, build and run.
Result: When I run the app and read the version of sqlite, it replies with the old version 3.6.12 which means that it's still using the dylib.
Poking around some more, I thought maybe I need to un-check "Link With Standard Libraries" in the target's Build Settings. But doing so produced only 49 linker errors relating to standard C library functions and unix functions, so I don't think that is correct.
What do I need to do here?
Thank you,
Jerry Krinock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden