{"id":2922,"date":"2014-03-10T12:44:55","date_gmt":"2014-03-10T12:44:55","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/10\/after-update-to-xcode-5-ld-symbols-not-found-for-architecture-armv7-or-armv7s-linker-error-collection-of-common-programming-errors\/"},"modified":"2014-03-10T12:44:55","modified_gmt":"2014-03-10T12:44:55","slug":"after-update-to-xcode-5-ld-symbols-not-found-for-architecture-armv7-or-armv7s-linker-error-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/10\/after-update-to-xcode-5-ld-symbols-not-found-for-architecture-armv7-or-armv7s-linker-error-collection-of-common-programming-errors\/","title":{"rendered":"After update to Xcode 5 &#8211; ld: symbol(s) not found for architecture armv7 or armv7s linker error-Collection of common programming errors"},"content":{"rendered":"<p><strong>Short answer:<\/strong><\/p>\n<ul>\n<li>Remove <strong>Build Active Architecture Only<\/strong> (build setting parameter key is &#8216;ONLY_ACTIVE_ARCH&#8217;) from all of your static libraries&#8217; project build settings or overwrite it with &#8216;NO&#8217; like in the screenshot below: <img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/eQs2E.png\" \/><\/li>\n<\/ul>\n<p><strong>Detailed answer:<\/strong><\/p>\n<p>The problem is that your static library &#8216;libCordova.a&#8217; which you&#8217;re linking in your main app is only compiled for one architecture (armv7, but not armv7s).<\/p>\n<p>You&#8217;ve probably let Xcode perform all the recommended changes for your static libraries project without reading what these changes actually are. Speaking for myself, I&#8217;ve never bothered to take a closer look at that info dialog (screenshot below), when I switched over to a new version of Xcode &#8212; until now. <img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/jKoFu.png\" \/><\/p>\n<p>The problem is that performing these changes activates for debug builds a new feature called <strong>Build Active Architecture Only<\/strong> (build setting parameter key is &#8216;ONLY_ACTIVE_ARCH&#8217;). In principle, this is a very cool enhancement of Xcode, because setting this to YES leads to faster building times, as Xcode only compiles the architecture of the connected device you&#8217;ve currently selected at the top when you hit the run button.<\/p>\n<p>However, when blindly accepting this new parameter in a static library, you may run into this bug. The bug occurs when you&#8217;ve built the debug version of a static library while having connected an armv7 device, and then, when you&#8217;re debugging your main application, you&#8217;ve connected an armv7s device (or vice versa). Subsequently you&#8217;ll get the error above (or a similar one).<\/p>\n<p>So my recommendation is to completely remove the value at project level for <strong>Build Active Architecture Only<\/strong> from all of your static libraries&#8217; project build settings. Because if you take a look at the iOS default, it is NO. Of course you can also overwrite the setting to &#8216;NO&#8217; to be sure the setting is correct even if in the future the default value will change (cf. 1st screenshot).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short answer: Remove Build Active Architecture Only (build setting parameter key is &#8216;ONLY_ACTIVE_ARCH&#8217;) from all of your static libraries&#8217; project build settings or overwrite it with &#8216;NO&#8217; like in the screenshot below: Detailed answer: The problem is that your static library &#8216;libCordova.a&#8217; which you&#8217;re linking in your main app is only compiled for one architecture [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2922","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2922"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2922\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}