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

1

1

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)
Mayes answered 28/8, 2012 at 3:35 Comment(1)
M
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);
}
Mayes answered 28/8, 2012 at 4:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.