5

I'm adding unit tests (SenTest) to my existing XCode 4.2 project. XCode is complaining that it can't find the required Box2D header files. For instance,

  Box2D/Dynamics/b2Fixture.h file not found

The Box2D source files are added to my project under the "libs" group. The header files are found without a problem when building the non-test target. Obviously, I can't add the header files to the test target, but I've added all of Box2D's .cpp files to that target. That just resulted in more of the "Lexical or Preprocessor Issue"s, as above.

How do I tell XCode where to find these header files?

4

1 に答える 1

3

.hファイルを参照するときにフォルダを指定する必要はないと思います。.hファイルのみが任意のグループまたはサブグループのプロジェクトに追加されている場合、名前のみで.hファイルを参照すると、XCodeはパスを見つけることができます。

于 2012-03-21T10:13:37.703 に答える