Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'ld: file not found' after changing product name in Xcode

I was working on my application and i started out with a really bad name. So i decided to change it. I did that like this.

enter image description here

At the top right corner i simply changed the name to what i want. and then i started getting the error as you can see there. Reveal in Log shows these details:

enter image description here

The main error says:

ld: file not found: /Users/.../XCode/DerivedData/...

like image 463
hamzah Avatar asked Mar 21 '15 11:03

hamzah


2 Answers

Go to edit scheme as shown below. enter image description here

then uncheck all other targets except your main target under build tab. enter image description here

like image 185
Vamshi Krishna Avatar answered Nov 15 '22 18:11

Vamshi Krishna


Real Issue

After changing the PRODUCT_NAME (as seen in the question) the erroneous reference to Host Application is the real cause of the issue.

Just select your Tests-Target and under the General-Tab select your updated Host Application.

Afterwards, building the project will work.

Tests Host Application

like image 42
YoshiJaeger Avatar answered Nov 15 '22 18:11

YoshiJaeger