static library builds in debug configuration but not in release configuration

断了今生、忘了曾经 提交于 2019-12-25 06:13:11

问题


I get a 'Lexical/Preprocessor Issue "*.h" not found' error when I build for release.

But it builds perfect fine if I set the build configuration to Debug.

I have this static library project in the same workspace, so I am assuming it builds every time I build my project just like CocoaPods.

When I look in the build folder, the .a file is not copied over. But it is there for the debug config. Maybe it is trying to call a header before the static library is built.

I have looked all over stack overflow and I feel like I have tried everything. This is not a duplicate.

I have -ObjC in other linker flags.

I have checked the Prefix Header

Update: The User Header Search Path is "$(BUILT_PRODUCTS_DIR)" both debug and release

Thanks for your help.


回答1:


For your project target Build Settings, look for "Search Paths->Header Search Path". Compare your Release and Debug settings here.

Also look into the "Build Location" for the library project for Release and Debug.



来源:https://stackoverflow.com/questions/16972207/static-library-builds-in-debug-configuration-but-not-in-release-configuration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!