你期待连接问题,profile_rt
库使用fopen$UNIX2003
和fwrite$UNIX2003
功能,而不是fopen
和fwrite
。
所有你需要的是以下.c
文件添加到您的项目:
#include <stdio.h>
FILE *fopen$UNIX2003(const char *filename, const char *mode)
{
return fopen(filename, mode);
}
size_t fwrite$UNIX2003(const void *a, size_t b, size_t c, FILE *d)
{
return fwrite(a, b, c, d);
}
此代码只是重新映射缺少的功能,以标准的。在$UNIX2003
后缀
注:
我发现一个Apple document说:
The UNIX™ conformance variants use the $UNIX2003 suffix.
Important: The work for UNIX™ conformance started in Mac OS 10.4, but was not completed until 10.5. Thus, in the 10.4 versions of libSystem.dylib, many of the conforming variant symbols (with the $UNIX2003 suffix) exist. The list is not complete, and the conforming behavior of the variant symbols may not be complete, so they should be avoided.
Because the 64-bit environment has no legacy to maintain, it was created to be UNIX™ conforming from the start, without the use of the $UNIX2003 suffix. So, for example, _fputs$UNIX2003 in 32-bit and _fputs in 64-bit will have the same conforming behavior.
因此,我希望libprofile_rt
对抗10.4 SDK链接。
将此.c文件添加到我在XCode 4.3.2中的项目中,并打开我的主目标(仅限调试)的覆盖范围和检测工作!这是我第一次在iOS开发中使用全功能的代码覆盖。我甚至使用gcovr和Coburtura插件将它与Jenkins集成在一起。 – 2012-05-15 16:54:18
99%的时间对我有用,但我仍然随机发生崩溃。有什么想法吗?我们的测试框架将重新启动应用程序100多次。在过夜运行,它总是发生,但非常间歇性 – 2012-05-31 21:20:43
@BrianKing你应该提交一个单独的问题与您的崩溃细节。 – iHunter 2012-06-02 08:09:11