开发者

GHUnitIOS Build error

开发者 https://www.devze.com 2023-02-09 05:56 出处:网络
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 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号