Re: Linker refuses to link my dylib? Why?
Re: Linker refuses to link my dylib? Why?
- Subject: Re: Linker refuses to link my dylib? Why?
- From: "Theodore H. Smith" <email@hidden>
- Date: Wed, 14 Feb 2007 23:23:13 +0000
On 14 Feb 2007, at 22:09, Greg Guerin wrote:
Theodore H. Smith wrote:
I tried all those already. No luck :(
How can it be that Xcode's default BSD library stationary will
result in a
linker error, when using my source code? My code is good it compiles
everwhere else.
I don't think you're really using just the default BSD library
template. I
deduce this from the following settings:
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk
OK.
I did use those custom settings.
But then I tried a second target with the default BSD library
templates. Neither worked.
Neither of these would appear in a plain default BSD library project.
Therefore, you've either manually changed some settings from the
defaults,
or you're using an xcconfig template file (search list archives for
xcconfig).
Or I made another target :) Apologise for not being clearer. It
sounded like I was talking about one target, but I did a second
attempt with default template.
If you've changed settings manually, it's possible you've also
changed one
that involves prebinding. If you're using an xcconfig file, it may
contain
a prebinding setting.
Two things lead me to the prebinding issue:
1) You have this in the compilation command:
... -framework Carbon -arch ppc -prebind ...
2) The 'ld' program is complaining about prebinding.
When I create a new project from the BSD library template, the project
settings default to prebinding off. This is before I add any
source code
at all to my project.
Your project, however, appears to have this setting turned on. How
it got
that way, I don't know.
The PREBINDING setting I see in my project is in the project
settings, not
the target settings.
Double-click the top-level item under "Files and Groups", and a
window will
appear. Its title bar will be:
Project "your project name here" Info
Click Build tab, then choose Configuration: All Configurations and
Collection: Linking. The Prebinding setting (a checkbox) should be
off.
After it's turned off, it should then appear in the list when you
choose
Collection: Customized Settings.
If it's already turned off at the Project Info level, it may still be
turned on at the Target Info level. Double-click your target item
to bring
up a window:
Target "your target name here" Info
Apply the same procedure. At this point, I think the prebinding
warnings
should go away.
I believe prebinding is covered in the builtin Xcode documentation.
The following setting also triggers a vague recollection of the
kinds of
errors you're seeing, but I can't quantify it. I may be
misremembering.
GCC_DYNAMIC_NO_PIC = YES
You could try turning it off and see what happens (it's only on by
default
in the Release config).
Finally, you can try recreating the project from scratch, adding
source and
compiling Release with nothing but the defaults. If that works,
change
settings manually one by one, to match the state of your posted
customized
settings, recompiling each time until it breaks. As usual, keep
checkpoint
backups along the way.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40elfdata.com
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