Transferred from: http://www.reader8.cn/jiaocheng/20131022/2003334.html
Undefined Symbols for Architecture http://www.reader8.cn/jiaocheng/20131022/2003334.html:
"_utf8_nextcharsafebody", referenced from:
-[srwebsocket _innerpumpscanner] in Avoscloud (SRWEBSOCKET.O)
Ld:symbol (s) not found for architecture armv7
Clang:error:linker command failed with exit code 1 (use-v to see invocation)
I was added with Pod AVOs, before the use of many AVOs have not experienced problems, this strange strange appearance of this problem, do not know what the less cited ...
This is because, starting with 2.5.9, Avoscloud increases the functionality of real-time communication and relies on libicucore.dylib.
Linker command failed with exit code 1 (use-v to see invocation) error Debug condition 1, linker command FAI
Linker command failed with exit code 1 (use-v to see invocation) error debugging
Situation 1,
Linker command failed with exit code 1 (use-v to see invocation) This error seems to have met and more than once, when I want to use a third-party class library (such as Sbjson), I directly copy the library file into the project directory Face, and then a compilation of such errors (not necessarily will make such an error), began to think that the library itself is the download of the problem, so re-find the class library or other ways to add it, as long as the line is not wrong, and has not been in-depth understanding of the fundamental problem, today in the project to add a Fmdb ( SQLite third-party library) file compile time again this error occurred, initially thought engineering problems, but after the new project still appeared this problem, after online search, got the solution;
[CPP] view plaincopy
- Undefined Symbols for Architecture i386:
- "_objc_class_$_fmdatabase", referenced from:
- Objc-class-ref in VIEWCONTROLLER.O
- Ld:symbol (s) not found for architecture i386
- Clang:error:linker command failed with exit code 1 (use-v to see invocation)
The solutions available online are:
In the left navigation bar of the work target-->build phases-->compile sources, all the. m files of the third library are added to the inside, and then compiled through;
Add. m file
Depending on the comparison, you can see that the in Fmdbtest,fmdbtest target adds some. m files
For the above error, according to the Netizen answer my understanding is
When we use these third-party library files, we drag them directly into the project, and when we compile it, Xcode does not automatically refer to it, so this error can be caused by adding it manually. If we create a new file in the project, there will be no such problem;
Reference http://blog.hsin.tw/2012/ios-dev-undefined-symbols-for-architecture-i386/
Situation 2,
Linker command failed with exit code 1 (use-v to see invocation)
It is likely that many of the same files were introduced in the project. Delete one on ok!
Situation 3,
A compile error for Xcoder:
Linker command failed with exit code 1 (use-v to see invocation)
Indicates that there is a function that cannot be found accurately, and the function has a repeating phenomenon.
The reason for this error is that I implemented several functions directly in the. h header file, and then the header file was referenced by another. c file and implemented.
So the solution is to put the implementation of a few functions out of a. c file. This will be OK.
Situation 4,
Change the value of Valid architectures to ARMV7
Process:
PROJECT--Build Settings--and architectures--Valid architectures his value was ARMv7 armv7s (ios6.0) Remove armv7s Can
The same operation
TARGETS---Build Settings---architectures and Valid architectures make the same changes
Situation 5, very wonderful situation ah, refers to the third party's static library. A there was a problem. The static libraries introduced in the simulator and the real machine are separate!!! Of course, if your static library is made unified, there will be no scenario 5.
Linker command failed with exit code 1 (use-v to see