开发者

Unit testing iphone app withXcode, SenTestCase and C++ dependencies

开发者 https://www.devze.com 2023-02-11 17:36 出处:网络
I have a iphone开发者_如何学JAVA project with a embedded (for ease of use) open source C++ project in it (meaning its folders are just a group inside the project). Following Apple\'s tutorial on unit

I have a iphone开发者_如何学JAVA project with a embedded (for ease of use) open source C++ project in it (meaning its folders are just a group inside the project). Following Apple's tutorial on unit testing Xcode, I could run the tests no problem, provided the only imported files are from Objective-C classes.

However, whenever I run tests that import C/C++ code, the test target fails on tons of "file not found". Any idea on how to solve this, without turning all C/C++ deps on system files?


Try using the .mm extension for your C files, if you're not using it already...

If we're talking about TONS of files, go ahead and try renaming one and see if that removes it from the "file-not-found-pile".


Actually just configuring the search path on the test target solved this. Which is kinda odd, as the project target is a dependency. However, it lead to other issues, which this SO thread took care of it.

0

精彩评论

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