ap123
ap123

Reputation: 986

Xcode 10 Error: linker command failed with exit code 1

I just updated my Xcode to Xcode 10 and now my project will not run and I get the error:

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

I do not know what this means and how to fix it. I tried googling everywhere for the answer and came up with nothing. How can I fix this?

Upvotes: 10

Views: 18341

Answers (6)

yveszenne
yveszenne

Reputation: 736

Open the projectname.xcworkspace if you are using cocoapods not the projectname.xcodeproj.

Alternatively, using terminal

$ open projectname.xcworkspace

enter image description here

Hope this helps.

Upvotes: 10

Ka-h Truong
Ka-h Truong

Reputation: 11

You can open the RN..xcworkspace, and expand the Frameworks folder. You will see the file highlighted in red, delete it, Learn the build and rebuild the project, This problem will be resolved. goog cluck!

Upvotes: 1

Matt Parkins
Matt Parkins

Reputation: 24708

I had this problem today in C++ using a newly upgraded Xcode 10 in a project that does not use pods, unlike the other answers.

When I clicked on the linker error there were no details given. This stumped me for a while and then I realised you can right-click the linker error and click "reveal in log".

In my case it was just a function that I had renamed-but-not-updated-all-the-references-to-it causing a linker error, but the real problem was that the linker error details were not being shown when the error occurred.

enter image description here

Upvotes: 5

Lean van Heerden
Lean van Heerden

Reputation: 892

In your project, open the Project Navigator, and expand the Frameworks folder. You will see the file -lstdc++.6 highlighted in red, delete it, rebuild your project and you're good to go.

Upvotes: 2

user798719
user798719

Reputation: 9869

go to your project directory in the terminal

Type:

pod deintegrate
pod install

Upvotes: 3

Midhun
Midhun

Reputation: 2197

please use cocoapods for dependency management, if you already using it then remove all pods and add it again / update all pods

https://stackoverflow.com/a/52050043/9978212

Upvotes: 0

Related Questions