On Dec 8, 2013, at 5:58 PM, Fritz Anderson <[email protected]> wrote:

> On 6 Dec 2013, at 5:39 AM, Thomas Wetmore <[email protected]> wrote:
> 
>> I'm using Xcode 4 and have a few static libraries that provide 
>> infrastructure for my applications.
>> 
>> When I build the libraries I get the warning: "Dependency cycle for target 
>> "xxx.lib" detected: xxx.lib -> xxx.lib"
>> 
>> Intellectually I understand what the dependencies are, classes that mutually 
>> refer to one another. But my naive assumption is that the linker works it 
>> out if only because the ranlib program is run on the archive files. I've 
>> been getting this warning on just about every static library I've written 
>> for years, so certainly nothing urgent here. It is only a warning and I've 
>> never had any problems linking against these libraries.
>> 
>> I've googled for information and I searched through the Apple and GNU docs 
>> for help understanding this warning message, but so far have had no success 
>> finding info that directly addresses this warning and its consequences. When 
>> I google the only real results I get are my posting of about this same 
>> question two and half years ago!
>> 
>> Can anyone offer any context? Should I be worrying about these warnings?
> 
> I'd proceed from the notion that the error message means exactly what it 
> says: Your target that produces xxx.lib depends on xxx.lib to build it. Check 
> the Build Phases tab of your Target editor, and look at the Target 
> Dependencies, Compile Sources, and Link Binary With Libraries phases to see 
> if xxx.lib (or something that needs xxx.lib to build it) is present.
> 
>       — F

Thanks for responding. I am proceeding with that notion. For one of the 
libraries that generates the message, the Target Dependences is empty, the 
Compile Sources is the five .m files in the library, and the Link Binaries with 
Libraries holds only Foundation.framework. The library is as vanilla as one can 
get, wholly self-contained except for Foundation. There are no dependency loops 
in the library code that I can find, and the library is so simple that I 
believe a quick visual check is sufficient to prove this.

It is interesting that the summary view in the middle of the header area 
displays "No issues". The warning is found only in the detailed log of build 
activity in the Build Preparation area of the log (rightmost tab in the 
Navigator).

Does anyone know of an option that would show the dependency cycle? Running the 
analyzer does not. The message: "Dependency cycle for target 'GeoNamesLibrary' 
detected: GeoNamesLibrary -> GeoNamesLibrary" isn't helpful.

Tom




_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to