Ios:xcode the link error ("_fwrite$unix2003", referenced from:) When compiling the low version project under Beta

Source: Internet
Author: User

Development of more projects, for a i386 error, processing should be handy, but carefully, with the previous encounter i386 error is not the same, the direct search i386 is not found the solution to the problem, if you search "Undefined symbols for Architecture i386"will search out some answers, but not many, and can solve the current problems encountered, but also have to try after their own to know the line or not. Here I would like to tell you some of the solutions I found at that time:

1, the lack of class library, their own project is not missing the class library itself or know, see the above error is also like a lack of class library, so this answer directly discarded2, this need to do their own operation, here I will simply say the steps, well, finally did not help me solve the problem, so repeat the next step, there is time to try: Click on the left column of the Xcode Project project: Target->build settings-> Apple LLVM 6.0-language-c++ to this, modify the C + + standard library property to libstdc++ (GNU C + + standard library) Neither of the above methods can really solve the problem, there is no solution to this problem, do not worry, the following is the solution to the problemthe error that occurred:Workaround:First, add the following code to the AppDelegate.h file:
#ifdef DEBUG     *fopen$unix2003 (constcharconstchar *mode);    size_t fwrite$unix2003 (constvoid *ptr, size_t size, size_t nitems, FILE *stream); #endif

Then add the following code in the APPDELEGATE.M file:

#ifdef DEBUG     *fopen$unix2003 (constcharconstchar *mode) {        return fopen (filename, mode);    }    size_t fwrite$unix2003 (constvoid *ptr, size_t size, size_t nitems, FILE *stream) {         return fwrite (PTR, size, nitems, stream);    } #endif
The problem is solved by adding the above code to the specified class. This may be a bug in Xcode, upgrade to the official version, there may not be a problem. Reference: Http://blog.sina.com.cn/s/blog_b2b0ab4b0102v8k7.html

Ios:xcode the link error ("_fwrite$unix2003", referenced from:) When compiling the low version project under Beta

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.