gtest.h file not found googletest xcode 7.0

后端 未结 3 906
Happy的楠姐
Happy的楠姐 2021-02-15 00:45

I\'m trying to setup google testing framework for my c++ project following this guide in xcode 7.0 I got to the last step Build and Go but after hours of searching online I can\

3条回答
  •  不思量自难忘°
    2021-02-15 01:26

    Sometimes, Xcode cannot find header files in framework. You need additional steps to make it work.

    • In build settings, complete Framework Search Paths with the path to your framework, which is gtest.framework.

    • Add the framework path and to User Header Search Paths.

    • If Xcode cannot find "gtest/internal/gtest-port-arch.h", you can find it in source folder "googletest/googletest/include". Add it to User Header Search Paths.

    After these steps, gtest should work in Xcode 7.0.

提交回复
热议问题