ld: 871 duplicate symbols for architecture armv7, clang: error: linker command failed with exit code 1 (use -v to see invocation)

▼魔方 西西 提交于 2019-12-06 03:54:56

Here's a solution I found even after messing with the header/framework search paths, rebuilding, etc:

http://support.fastpdfkit.com/discussions/problems/443-i-am-unable-to-link-fastpdfkitembeddedframework

I removed the -all_load linker flag in my project and it compiled successfully. As a warning, make sure removing this flag is appropriate for your project. It was probably placed there for a reason

Can you try to clean up the FastPdfKit target and recompile it? It should generate a new framework ex-novo that you then should be able to add to you project, overwriting the one you are using. You can grab the new .embeddedframework in the FastPdfKit project root directory.

These line helped me from the link below.

http://support.fastpdfkit.com/discussions/problems/759-duplicate-symbols-for-architecture-armv7

AITAALI_ABDERRAHMANE

there are another reason this error often happens is accidentally importing the .m file instead of the .h.

it's happened to me :)

link : https://stackoverflow.com/questions/12279622/duplicate-symbols-for-architecture-i386-clang

You have too many #include or #import directives in header files for the same things. Move to using @class in headers and only import/include in your .m files.

In all you just need to review where these are and reassess them.

I add my solution, as if you follow the readme, it will ask you to do:

Inherit the project options: select the Project an from info tab and configurations line choose **FastPdfKitFramework** from the drop down list;

I replace the FastPdfKitFramework target to None and now it work great.

As it is on the readme file, I never add .a in my project so download the recompile one don't help me as I do not want to restart all integration. I hope it can be helpful for someone.

Arun K

I tries removing -all_loads linker flag, and it worked for me without any problem in the project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!