Error in emulator iphone4s and iphone5 using Xcode
Compile-time error description:
for Architecture i386: " _fwrite$unix2003 ", referenced from:
At first it felt like a. A file was not compiled separately i386,x86_64 caused, after recompilation
Lipo-Info xxxx.a
The. A file was found to support I386,X86_64, but the compilation did not pass.
After searching some information on the Internet, we find that the solution needs to add a. c file to the project.
#include <stdio.h>#include<unistd.h>#include<string.h>#include<stdlib.h>FILE*FOPEN$UNIX2003 (Const Char*filename,Const Char*mode) { returnfopen (filename, mode);}intFPUTS$UNIX2003 (Const Char*res1, FILE *res2) { returnfputs (res1,res2);}intNANOSLEEP$UNIX2003 (intval) { returnUsleep (val);}Char* STRERROR$UNIX2003 (interrornum) { returnstrerror (ErrorNum);}DoubleSTRTOD$UNIX2003 (Const Char*nptr,Char**endptr) { returnstrtod (nptr, endptr);} size_t fwrite$unix2003 (Const void*a, size_t B, size_t C, FILE *d) { returnFwrite (A, B, C, D);}
Compiled by
XCode 6.4 Compilation Error----Undefined symbols for Architecture i386: "_fwrite$unix2003"