Xcode代码覆盖率和fopen $ UNIX2003 [英] Xcode Code Coverage and fopen$UNIX2003

查看:107
本文介绍了Xcode代码覆盖率和fopen $ UNIX2003的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正面临着一个似乎广泛传播的问题:当我使用Lion激活Xcode(4.2.1)中的代码覆盖率时,它显示以下错误:

I am facing what seems to be a pretty wide spread issue : when I activate code coverage in Xcode (4.2.1) with Lion it shows the following error :

Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
fopen$UNIX2003 called from function llvm_gcda_start_file

我按照此处,并向我的测试目标添加了一个文件,该文件带有fopen函数的映射,但对我不起作用。有了新的C文件,我遇到了很多解析和语义问题,好像它完全把编译器搞砸了。

I followed the workaround described here and added a file to my test target with a mapping for the fopen function but it won't work for me. With the new C file, I get a lot of Parse and Semantic issues, as if it was completly messing the compilator up.

我是否有一个特定的配置/编译器选项失踪了吗?我应该如何精确地添加新文件?

Is there a specific config/compiler option I am missing ? How exactly should I add the new file ?

推荐答案

实际上,当我在.m中重命名.c文件时,该问题已解决。文件...例如,我不知道这是否可能是与ARC相关的问题。

Actually the problem was fixed when I renamed the .c file in a .m file... I don't know if it could be an issue linked to ARC for instance.

这篇关于Xcode代码覆盖率和fopen $ UNIX2003的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆