attempt to call symbol that is not present in system libraries (llvm_gcda_start_file)

扶醉桌前 提交于 2019-12-11 04:37:01

问题


I'm trying to follow the instructions in XCode - Code Coverage? and Code Coverage on Xcode 4.4.1

The .gcno files are generated in DerivedData, but I can't get it to generate the .gcda files. When I press the home button the logs say:

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 in image MyApp. 
(lldb)

回答1:


As per Xcode Code Coverage and fopen$UNIX2003 and Code coverage with Xcode 4.2 - Missing files

Add the following as a .m file to your project:

#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);
}


来源:https://stackoverflow.com/questions/12152416/attempt-to-call-symbol-that-is-not-present-in-system-libraries-llvm-gcda-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!