12

I am having trouble building my app after adding MapKit and CoreLocation frameworks. They are both 4.3 frameworks, and the app used to work fine with UIKit, CoreGraphics, and Foundation, just giving me problems with these two. Not sure what the required architecture is, there aren't any bugs in the code. Any help is appreciated!

ld: warning: ignoring file /Users/F3d3r3r/Desktop/testNav4_3/MapKit.framework/MapKit, missing required architecture i386 in file

ld: warning: ignoring file /Users/F3d3r3r/Desktop/testNav4_3/CoreLocation.framework/CoreLocation, missing required architecture i386 in file

Undefined symbols for architecture i386:
  "_CLLocationCoordinate2DMake", referenced from:
       -[Layer2 tableView:cellForRowAtIndexPath:] in Layer2.o
  "_OBJC_CLASS_$_MKMapView", referenced from:
       objc-class-ref in Layer2.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Rayfleck
  • 12,116
  • 8
  • 48
  • 74
F3d3r3r
  • 125
  • 1
  • 1
  • 5
  • 1
    possible duplicate of [Build Error - missing required architecture i386 in file](http://stackoverflow.com/questions/1456185/build-error-missing-required-architecture-i386-in-file) – Carl Norum Apr 04 '11 at 22:22
  • 1
    This is WAY more useful than my suggestion. – Rayfleck Apr 04 '11 at 22:37

4 Answers4

45

Add the CoreLocation framework, which has CLLocation, as well as MapKit.

Rayfleck
  • 12,116
  • 8
  • 48
  • 74
7

I got the same issue.. after a long struggle I found the issue..

I resolved it this way..

  1. Go to Build Settings
  2. Search for 'framework search path'
  3. And delete the pre filled path.

Now it works perfectly.. hope it helps some one..

Dilip Rajkumar
  • 7,006
  • 6
  • 60
  • 76
1

Be careful if you copy the framework from Finder to the project. Ensure that; "Copy file ..." option is NOT checked when you add it to your project.

Check the root folder of your project and if you've copied it. Delete it and try to add from scratch.

Adding from "Build Phases", "Link Binary With Libraries" section of Xcode is highly recommended.

nesimtunc
  • 849
  • 7
  • 28
  • LTTP, but this should be the correct answer. Its likely that you copied over the project or a part of it containing the libraries and this messed up xCode. For anyone else coming on this thread I would try this first. – Jeremie D Aug 20 '15 at 13:59
0

I used $(inherited) in Build Settings -> Search paths

Refer below URL for $(inherited) usage, What is $(inherited) in Xcode's search path settings?

Community
  • 1
  • 1
Vinay
  • 539
  • 1
  • 4
  • 11