Why is a static library's header file not found for archiving?

后端 未结 3 2053
天涯浪人
天涯浪人 2021-01-31 11:29

I can build for debugging just fine. I\'ve triple checked that the static library is included in the build phases settings for the project. I\'ve also tried other things like he

3条回答
  •  不知归路
    2021-01-31 11:52

    Daniel Tull's answer will work, but instead of changing the 'Per-configuration Build Products Path', you can update the static library project Configurations to include a 'App Store' configuration or any other named configuration which your app target is building against, which is a duplicate of the Release configuration. This way, the static library will output it's library and headers/include files to the appropriate directory, which will be resolved by the $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) macro used in the 'Per-configuration Build Products Path'; and walllaaaaa...the public library headers can now be resolved properly by Xcode. So to sum it up, if you have an 'App Store' named configuration in your app's target and your linking against a static library which exports headers, make sure the static library project also includes the 'App Store' configuration and you will be one happy camper.

提交回复
热议问题