Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't link with a main executable file

Tags:

xcode6

Changed my deployment target to from 8.0 to 7.0.

Using Xcode 6 with latest iOS8 as base sdk. Getting this error when building for iOS7.1 device:

ld: can't link with a main executable file '/Users/Name/Library/Developer/Xcode/DerivedData/Clumsy_Bird-gotvuaeuyvrkzvfqpzsuxpmifimu/Build/Products/Debug-iphoneos/Clumsy Bird.app/Clumsy Bird' for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

enter image description here

How to solve this?

like image 925
user1872384 Avatar asked Sep 25 '14 06:09

user1872384


2 Answers

  1. Click your project in Navigator.
  2. Select your test target. Switch to general tab if not there.
  3. Select your application name from Host Application dropdown.

enter image description here

like image 158
Evgenii Avatar answered Dec 05 '22 07:12

Evgenii


I had a mismatch in values between on "Build Active Architecture Only" which was "Yes" for my test app, but "No" for my unit test target. Make sure these values are identical.

like image 25
Ben Flynn Avatar answered Dec 05 '22 07:12

Ben Flynn