In Xcode, What does it mean when the linked static library turns red when switching assembly configurations?

I think the name is pretty clear. I came across this twice.

The first time he pointed out a problem, and my project will not compile. The second time, everything still worked.

Is it just a coincidence if my code is still building when it turns red?

+6
iphone cocoa-touch xcode cocoa
source share
2 answers

Everything that appears in the list of files and groups that turn red indicates a missing file or directory. This is not necessarily a concern, because in many cases it is expected that the file will be created as part of your build process.

In the case of your linked static library, you probably depend on the second goal or project to create the static library. When you changed the build configurations, Xcode noticed that it was not built yet, so it shows it as red. When you built the project, and the library itself was built, it turned black again.

+14
source share

The first time he pointed out a problem, and my project will not compile. The second time, everything still worked.

This suggests that you do not have the correct build settings that will bite you every time you make a clean build. You must make the target (s), which requires a static library, have a clear dependence of the structure on the target, which creates this library.

0
source share

All Articles