Re: Linking can't find library in Deployment build
Re: Linking can't find library in Deployment build
- Subject: Re: Linking can't find library in Deployment build
- From: Scott Tooker <email@hidden>
- Date: Tue, 15 Mar 2005 09:35:09 -0800
On Mar 14, 2005, at 6:52 PM, Mike Lazear wrote:
On Mar 11, 2005, at 3:47 PM, Mike Lazear wrote:
I've got a simple Xcode 1.5 project that compiles and works fine
with the Development Build but when I do a Deployment build it
tells me it can't find a library. The library is the first
library in the list which means it probably won't find any of the
libraries. The project has about 10 static libraries which are
named something along the lines of macosx_abc.a The libraries
are all included in the project.
Most of the projects I work with don't have libraries so I may be
doing something obviously dumb here.
What I thought the obvious thing would be is that the library
search paths in the deployment build would be different than the
development Build but that is not the case. The Library search
paths are identical.
As a test I used the Duplicate build command to copy the
Development Build to a Test Build. I did a full Clean & Build and
it worked fine (as expected but just verifying before the next step).
I then turned off Zero Link in the Test build and left all other
settings exactly as they were. I then do a Clean & Build and I
get the error that my first library can't be found.
Why would a library link fine with the Zero Link option and not
work with the Zero Link option off?
The libraries I'm using were provided by a 3rd party so I have no
way of looking at their source. Can their possibly be something
in the library that would prevent the link if Zero Link is not on.
I'm sure without the seeing the full xcode project file with all
the settings it would be hard to know what's wrong but I would
appreciate any insight, guess or recommended readings.
Unfortunately, no one here responded with any ideas. However, I
also e-mailed the company that produces the libraries I was having
problems with. He said that he found with XCode you have to rename
the libraries so that they start with lib at the beginning of the
file name. That sounded pretty silly to me but I was willing to
try anything since I was stumped. It turns out that renaming the
files from something like "macosx_abc.a" to "libmacosx_abc.a"
worked. That makes zero sense to me. I mentioned that to a friend
and he said that was some kind of standard UNIX quirk. If that was
the case I would have thought it would tell me that the file
"libmacosx_abc.a" was missing instead of "macosx_abc.a".
This is a current limitation of how Xcode is passing down flags to
the linker. In a future version we want to remove this restriction.
Now I just need to figure out what options to tweak in order to
make the application a command line app instead of a bundled app.
Just add a new "Tool" target to your project (there are a variety to
choose from) and use it to build the command line tool.
Scott
Mike
_______________________________________________
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
_______________________________________________
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