Linker command failed with exit code 1 (use-v to see

Source: Internet
Author: User

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

    1. Undefined Symbols for Architecture i386:
    2. "_objc_class_$_fmdatabase", referenced from:
    3. Objc-class-ref in VIEWCONTROLLER.O
    4. Ld:symbol (s) not found for architecture i386
    5. 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

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.