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