XCode 6.4 Compilation Error----Undefined symbols for Architecture i386: "_fwrite$unix2003"

Source: Internet
Author: User

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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.