0

I have been stuck on this error for a long time. I have reviewed the trend on this topic and tried to open the project in .xcworkspace and still no luck. ld: file not found: /Users/xxxx/Library/Developer/Xcode/DerivedData/Txxx-butxfnudrokzxihekswcjwgejvzd/Build/Products/Debug-iphoneos/xxxxx.app/xxxxxx

clang: error: linker command failed with exit code 1 (use -v to see invocation)

what else can could i do to fix this?

update I clean and deleted derived data folder and then rebuild the workspace and this is the error i got import XCTest import Firebase @testable import Takehome

Takehome/TakehomeTests/TakehomeTests.swift:11:18: No such module 'Takehome'

jone2
  • 191
  • 1
  • 4
  • 18
  • clean your project, clean build folder, clear derived data folder. check just above your clang error for more information on what happened and post that – Scriptable Mar 13 '18 at 13:18
  • Refer to: https://stackoverflow.com/questions/38016143/how-to-delete-derived-data-in-xcode-8/40278559 – omaestra Mar 13 '18 at 13:24
  • @Scriptable I have updated the question with your instruction – jone2 Mar 13 '18 at 14:25
  • Run a build first so that your project successfully builds and then run the tests. (`CMD + R` and then `CMD + U`) – Scriptable Mar 13 '18 at 14:26

2 Answers2

0

Delete derived data from Xcode (preferences>location) and then clean. Also restart the whole machine. Oh yes, and delete from simulator / device.

stevenpcurtis
  • 1,907
  • 3
  • 21
  • 47
0
  1. If it is a small project, just recreate and write again. (simple one)
  2. Takehome folder is needed for the project, it can not find that folder and files in it. Delete files with red color names in the workspace if exists, then add them manually.
  3. The error is like file linking problem, if you use libraries, add one by one, build one by one.
BatyrCan
  • 6,773
  • 2
  • 14
  • 23