GHUnitIOS Build error

723 views Asked by At

I have been trying to get gh-unit working in an iOS project and I am getting a weird build error. I am using the 4.2 iOS SDK and XCode 3.2.5.

I followed this tutorial:

http://4arrowsmedia.com/2010/09/ghunit-setup/

And I am getting the same build error as the guy in the first comment.

expected '=', ',', ';', 'asm' or '__attribute__' before '*' token

Interestingly I only get this error when using a .pch file. If I don't use one then everything runs fine. I would like to use a .pch file as I have lots of header files I use throughout the project and I don't want to include them in every file.

1

There are 1 answers

0
drsquidop On

I just had this same problem and found that it was caused by having overlapping directories listed in my Header search paths. When I removed the duplicate directory, the build succeeded.

In my case I had:

Libraries
|---RestKit
|---GHUnit.framework

I had included both Libraries/ (recursive) and Libraries/RestKit/ in my Header Search Path. I removed Libraries/ and the build succeeded.