开发者

Unit testing won't setup properly on existing project, works fine on new projects

I have a iOS project that I've been using since iOS 2.0, and currently I'm working on updates using Xcode 4.1 and I'm finally wanting to set up unit testing. I found this step by step guide on how to set them up, and I've tried following it multiple times specifically the Logic tests part. When I try running the test test that is setup when you do this it fails with the message:

Undefined symbols for architecture i386:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have not added any code to the template file, and no framework changes and I get this. So I went and created a new single view project WITHOUT unit testing, then after the project was setup I followed the same above guide to setup logic tests, and when I hit test it runs and fails with the appropreate sample STAsser开发者_JS百科t string. I'm not doing anything different between the two projects. What can I do other then create a new project and migrate all my files over?


I ended up just creating a new project and migrating everything back in. Now it works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜