ios - 单元测试 Xcode 4 的链接器错误
<p><p>我的应用程序在我运行时构建良好,并且单元测试也构建良好</p>
<p>当我为 CGAffineTransform 添加一些代码时,单元测试失败(应用程序仍然正常)</p>
<p>模拟器和设备的行为相同</p>
<p>错误信息:</p>
<pre><code>Undefined symbols for architecture i386:
"_CGAffineTransformMakeTranslation", referenced from:
- in PhysicsObject-23B4A02B8F0621AD.o
"_CGAffineTransformMakeRotation", referenced from:
- in PhysicsObject-23B4A02B8F0621AD.o
"_CGAffineTransformConcat", referenced from:
- in PhysicsObject-23B4A02B8F0621AD.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
</code></pre>
<p>我尝试过来自</p>的建议
<p> <a href="http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/" rel="noreferrer noopener nofollow">http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/</a>
<a href="http://sealedabstract.com/code/tired-of-getting-mach-o-linker-errors-when-unit-testing/" rel="noreferrer noopener nofollow">http://sealedabstract.com/code/tired-of-getting-mach-o-linker-errors-when-unit-testing/</a>
<a href="https://stackoverflow.com/questions/5329001/apple-mach-o-linker-error-when-compiling-for-device" rel="noreferrer noopener nofollow">Apple Mach-O Linker Error when compiling for device</a> </p>
<p>没有任何效果:(我怀疑这与一个特别是没有找到的框架有关。我似乎无法确定是哪个。非常感谢帮助。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>前缀_CG是<code>CoreGraphics.framework</code></p></p>
<p style="font-size: 20px;">关于ios - 单元测试 Xcode 4 的链接器错误,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/9227384/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/9227384/
</a>
</p>
页:
[1]