Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I find XCTest/XCTest.h?

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?

like image 637
stian Avatar asked Mar 28 '14 18:03

stian


1 Answers

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

like image 66
Katta Nagarjuna Avatar answered Sep 29 '22 23:09

Katta Nagarjuna