• 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: SQLite install
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQLite install


  • Subject: Re: SQLite install
  • From: Philip Aker <email@hidden>
  • Date: Mon, 02 Jun 2008 11:22:31 -0700

On 08-06-02, at 10:24, Bruce Robertson wrote:

It's never a problem if you create an sqlite shell tool incorporating .a output from your custom build and then embed it in your application package. Similarly for a framework build of the library using the @executable_path/../Frameworks install path.

Hm, could you explain that a little more?

A .a build is for statically linked libraries.

When you build the sqlite shell, if you include the dynamic library in your build, the binary file size will be very small (~100K). That's because it uses the functions contained in /usr/lib/libsqlite3.0.dylib and links to the symbols for those functions at load time.

When you build a shell which is linked to the static version of the library it becomes a standalone program and all the code in the static library gets included in the build. It's size will be in the neighborhood of 2.5Megs.

A framework is a package wrapper around a dynamic library. If you want to be able to include the framework as a part of your application package (i.e. the library is relocatable), then the dynamic library, instead of using a hard-wired path which makes it known to the linker, uses a relative path. One of these relative paths is indicated by @executable_path (i.e. relative to the application loading the library).

Some of this is explained in the man page for dyld. Especially how, under some circumstances, you can use special environment variables to tell the linker you want to link to a certain version of a library (perhaps not in a standard location). The target library does have to cooperate in this process though.


Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: SQLite install (From: Bruce Robertson <email@hidden>)

  • Prev by Date: Variables and command-line args
  • Next by Date: Re: Variables and command-line args
  • Previous by thread: Re: SQLite install
  • Next by thread: Re: SQLite install
  • Index(es):
    • Date
    • Thread