Xcode 10 beta error: linker command failed with exit code 1

ぐ巨炮叔叔 提交于 2019-12-10 18:54:34

问题


This is the complete error:

ld: library not found for -lstdc++.6 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have no idea what is this about, I'm using Xcode 10 beta, and iOS 11.4.1, I have no "pods" project or anything like that, when I try to run the command:

pod install

I get the command not found.

I'm not using any additional tools or anything, so I'm only using npm and xcode command line commands.

Thanks.


回答1:


(I post the solution here for all those who googled "cocoapods lstdc xcode 10" since this is the first page that hits.)

If you are using cocoa pods and got a similar error then the solution is to delete -l"stdc++.6" from your xcconfig files. Now build and run. Xcode10 build should succeed now :)

Cocoa pods is for some reason adding stdc so it gets linked, but that is not be needed and Xcode10 does not have that library anymore.




回答2:


Libstdc++ was deprecated, the support was removed from the iOS 12 simulator (not for device).

One of the library in the pod file have a dependency builded with libstdc++, you can try to find a more recent version builded with the libc++.



来源:https://stackoverflow.com/questions/51367990/xcode-10-beta-error-linker-command-failed-with-exit-code-1

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