Re: static linking in XCode
Re: static linking in XCode
- Subject: Re: static linking in XCode
- From: Chris Espinosa <email@hidden>
- Date: Mon, 20 Feb 2006 11:17:20 -0800
On Feb 20, 2006, at 11:07 AM, Charles Francoise wrote:
Hi everyone,
i have this command line tool that works well on my computer. I
tried it today on someone else's, and it said the dynamic libraries
were missing. Apparently, for some reasons, Mac OS discourages
static linking. Nonetheless, I wish to distribute my command line
tool without everyone having to install the dynamic libraries. Is
this possible ? I have the static versions of the libraries I use.
If you a) use the -lmyLib flag to link with your libraries (and that's
what Xcode uses by default) and b) have both static and dynamic
versions of the library in the same directory in your library search
path, the linker has to pick one, and it picks the dynamic one. If
you specifically want the static one, use -l/path/to/my/static/
library.a instead. In Xcode you'd remove the library from the target
in the IDE, and add the specific -l line in Other Linker Flags.
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