Linker Errors After Switching to Xcode Data Collection Path

I have an Xcode 4 project that used the Legacy build location ( File->Project Settings->Advanced ).

The project has three goals. Static library A consumed static library B and then connected to the consuming C application.

I used the gist of this question ( Build a live static library (device + simulator) using Xcode and SDK 4+ ) to create a universal static library A and B , and then they lipo into one .a that is linked in C Everything works wonderfully.

I recently migrated (experimented) with setting the Build Location to the default Xcode in DerivedData, my C application started to have linker errors related to objects defined in A This is rather confusing since I confirmed that the fat library is being created correctly.

Is there another caveat clause that I should be aware of?

Update

Update using images. When choosing Legacy everything builds perfectly. With Xcode Default I get linker errors. This parameter is not even stored in your project, so I have to make sure that this whole machine uses this parameter. I do not understand the correlation between this setting and linker errors. Has anyone else come across this?

enter image description here

Update 2

I found this to be related to how I put together library A in B I am using libtool as follows.

  libtool -static -o superlib.a out/*.a 

This command succeeds, but the resulting .a not correctly associated with the application. If I take all the out/*.a files and associate them independently with the application, it works fine. Also, with the Legacy build location, superlib.a works superlib.a fine.

Puzzling.

+4
source share

All Articles