Xcode 6 linker error - Undefined symbols for architecture armv7

前端 未结 10 2038
粉色の甜心
粉色の甜心 2021-01-31 10:15

After upgrading to Xcode 6 beta 7 (and now still with Xcode 6 GM) I am unable to link my Swift app. I receive errors such as:

Undefined symbols for archit

相关标签:
10条回答
  • 2021-01-31 10:45

    There appears to be a bug in Xcode 6.0.1 that is causing the linker to drop dependencies in existing project files. I have had this same problem across several different projects, new and old, since the 6.0.1 update.

    The easy 'fix' is to just trash your entire 'Derrived Data' and all build files (i.e. manually clean the project) and then rebuild after a fresh Xcode restart. Magically, the linker now finds all the missing architectures/symbols.

    NOTE: I have had several incompatible v-table crashes caused by this same bug. The C++ linker appears to be generating incomplete linkages, causing absurd errors where there are no real errors to be found. Again, just rebuild from a clean state and .. ta da.. save yourself a LOT of headache and wasted time tracking down a non-issue.

    0 讨论(0)
  • 2021-01-31 10:48

    I have solved my issue by deleting all the data in the ~/Library/Developer/Xcode/DerivedData folder. I read about that in another thread, but ignored it thinking a clean included that process!

    0 讨论(0)
  • 2021-01-31 10:50

    1) I face the same problem but just clear the applications from derived data from User/Library/Developer/Xcode/DerivedData and I am able to run the code.

    2) In your case may be, it will run by removing armv7 architecture from build settings. And make sure your compiler is Default Compiler in Build Settings.

    Thanks I hope this helpful to you and everyone.

    0 讨论(0)
  • 2021-01-31 10:54

    I solved this issue after trying all that was suggested here with no luck. Like someone said earlier, it's a SourceControl issue.

    One of my project files (the one referenced in the error message) was missing from the project browser. However, XCode still had a reference to it (I was going to the class definition when I was selecting "jump to definition" from Xcode GUI).

    As a matter of fact, the project.pbxproj was not listing it. This was probably a Git Issue. In any event, I just recreated the file in the same directory it has been recreated and voila.

    0 讨论(0)
提交回复
热议问题