static library builds in debug configuration but n

2019-09-05 09:02发布

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条回答
Deceive 欺骗
2楼-- · 2019-09-05 09:36

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.

查看更多
登录 后发表回答