문제

I am trying to get started with tdd within Xcode, and followed a very nice tutorial.

Everything went well. However, when I want to make a command line application (in c) project in Xcode a separate test-folder was not created.

I want to build a random graph implementation, and my project graph consists of main.c, graph.h and graph.c. I decided to add a test-file (objective C test file case).

Here, I have the import XCTest/XCTest.h but when running (Product->run) I get the error that XCTest/XCTest.h is not found. I also do not get to run test mode (Product-test).

why is that header-file not found? and how do I fix it?

도움이 되었습니까?

해결책

XCTest/XCTest.h will work for testTarget only not for other targets try to remove targets for your xxxtest.m file. you can do that by removeing it form compileSources of that target

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top