Linking against a Framework that links against a dynamic library
Linking against a Framework that links against a dynamic library
- Subject: Linking against a Framework that links against a dynamic library
- From: Scott Gruby <email@hidden>
- Date: Fri, 30 Apr 2004 00:00:03 -0700
We have a Framework that we've developed that links against a dylib
file that we also developed and has the install path for the dylib set
to /Library/Frameworks/OurFramework.framework/Versions/A/Frameworks/
(we know that the framework will always be in that path). The Framework
and dylib build and link without problems. We also have an application
that we build against the framework. (The framework has the install
path set to /Library/Frameworks/)
For the application (and other components), we use the 10.2.8 SDK to
remain compatible which causes setenv NEXT_ROOT
/Developer/SDKs/MacOSX10.2.8.sdk to be set at compile time thereby
making the reference to our dylib be
/Developer/SDKs/MacOSX10.2.8.sdk/Library/Frameworks/
OurFramework.framework/Versions/A/Frameworks/libOur.dylib which
obviously doesn't exist and causes the link to fail. If we set the SDK
to current OS, then this builds and links fine (I have a symbolic link
to our framework in /Library/Frameworks/ for development). Directly
adding the dylib causes the link to work w/o problems, however, we want
others to be able to use our framework without having to add the dylib
to their project and to be able to use the 10.2.8 SDK. Is there an easy
way to solve this? I'd like to be able to weak link the dylib somehow
so that linking against the framework works. (We also don't want to
have to tell others to set special compile/link flags in their apps; we
can do this for our own, but don't want to have to have others do
that.)
I've searched the web, list archives, etc. and tried a number of
things, but have been unable to accomplish this goal. Any ideas?
Thanks in advance.
--
Scott Gruby
<mailto:email@hidden>
<http://www.gruby.com/>
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.