• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Linking with static sqlite 3 library
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking with static sqlite 3 library


  • Subject: Re: Linking with static sqlite 3 library
  • From: Chris Espinosa <email@hidden>
  • Date: Wed, 8 Jun 2005 17:22:24 -0700

On Jun 8, 2005, at 12:31 PM, Marco Bambini wrote:

I am using XCode 2.1 and MacOS X 10.4.1, I have a project (C console app) that needs to be linked with a static sqlite3.a library generated by gcc on the same machine.

Before Tiger I have no problem in the link stage and the final build was around 400KB.

After upgrading to Tiger, the final build is about 70KB and I think that is linked to the shared sqlite3 library shipped with the OS.

So my question is, how can I force my project to link to my static sqlite3 library instead of the shared one?


We just saw this yesterday.  Turns out that the linker prefers to use a .dylib over a .a when you have both.

So you need to do the following:
- remove the sqlite3.a library from your project
- add an explicit flag in Other Linker flags that reads something like "-l/usr/local/lib/sqlite/libsqlite3.dylib"  (replace with the appropriate fully-qualified path to your lib)

Chris
 _______________________________________________
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

  • Follow-Ups:
    • Re: Linking with static sqlite 3 library
      • From: Eric Albert <email@hidden>
References: 
 >Linking with static sqlite 3 library (From: Marco Bambini <email@hidden>)

  • Prev by Date: Re: Linking with libraries in SDKs
  • Next by Date: Re: Problem compiling after upgrade to XCode 2.1
  • Previous by thread: Linking with static sqlite 3 library
  • Next by thread: Re: Linking with static sqlite 3 library
  • Index(es):
    • Date
    • Thread