Re: Problem with prebinding and Frameworks
Re: Problem with prebinding and Frameworks
- Subject: Re: Problem with prebinding and Frameworks
- From: Sherm Pendley <email@hidden>
- Date: Wed, 3 May 2006 16:22:07 -0400
On May 3, 2006, at 3:00 PM, Julio Bianco wrote:
I've got an external framework developed by somebody, and I'm
developing a framework that uses this other one, and then an
application that uses my own framework. Everything works just fine
with my own framework, but because of some new ways to work with
links with code developed from OSX 10.4, I don't need to prebind
the frameworks, and when I try to build my application, it doesn't
works. I get an this error:
/usr/bin/ld: warning can't open dynamic library:
@executable_path/../Frameworks/i1C.framework/Versions/A/i1C
referenced from: /Users/jbianco/BuildProducts/Release/
TCFwkEyeOne.framework/TCFwkEyeOne (checking for undefined symbols
may be affected) (No such file or directory, errno = 2)
That has nothing to do with prebinding. For one thing, it says
nothing about prebinding. For another, failure to prebind is a
warning, not an error.
The third-party framework is configured to be in MyApp.app/Contents/
Frameworks, and the linker isn't finding it there. I'd guess that
you've copied it into TCFwkEyeOne.framework/Contents/Frameworks instead.
If you want to bundle a framework inside another framework, you can
specify @loader_path (which is only supported on >= Tiger) instead of
@executable_path in the inner framework's install_name.
If Panther compatibility is important, you'll need to supply an
install_name that begins with @executable_path. Whether the framework
is actually in the .app or your .framework isn't important; what's
important is that the install_path gives the correct location,
whatever that location might be.
/usr/bin/ld: Undefined symbols:
_I1_GetTriStimulus referenced from TCFwkEyeOne expected to be
defined in @executable_path/../Frameworks/i1C.framework/Versions/A/i1C
_I1_IsConnected referenced from TCFwkEyeOne expected to be defined
in @executable_path/../Frameworks/i1C.framework/Versions/A/i1C
_I1_TriggerMeasurement referenced from TCFwkEyeOne expected to be
defined in @executable_path/../Frameworks/i1C.framework/Versions/A/i1C
And I was investigating, and I realize that the problem I get is
generated because of the warning
The lesson here is not to investigate backwards. Build-time errors
need to be debugged in the order in which they're reported, because
it's very common for an error in one build step to "cascade" down and
trigger other errors in later steps. Trying to solve the later errors
first is guaranteed to lead to frustration.
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden