Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap/Cordova 3.4 clean build gets apple mach- linker error

Tags:

cordova

I tried several options on stackoverflow. But none of them seem to work.

My project is just a clean phonegap build.

I just updated phonegap from 3.3 to 3.4 and i get these messages: https://www.dropbox.com/s/7zsn21n5sakp0d3/Screenshot%202014-03-18%2012.50.03.png

like image 281
peterdoesco.de Avatar asked Mar 18 '14 11:03

peterdoesco.de


3 Answers

i found the solution:

  1. Select your Project icon
  2. Choose Build Settings.
  3. For "Architectures", select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64)
  4. For "Valid Architectures", add "arm64"
  5. Select your CordovaLib.xcodeproj icon
  6. In the Build Settings for the Project (not Target), delete the conditional architecture settings (this is any value under "Release" or "Debug" - hover to see the minus sign)
  7. For "Architectures", select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64)
  8. For "Valid Architectures", add "arm64"
  9. Goto 6, but now do it for "Target"

source

like image 73
peterdoesco.de Avatar answered Oct 13 '22 00:10

peterdoesco.de


Try this...

In Xcode, click your project and go to Build Settings > Architectures > Build Active Architecture Only and set both Debug and Release to Yes.

Your error seems similar to something that happened to me.

More here... Phonegap/Cordova Build error - Apple Mach-O Linker Error: no such file or directory: libCordova.a

like image 26
Mulhoon Avatar answered Oct 12 '22 23:10

Mulhoon


Check that the Build Settings > Architectures > Build Active Architecture Only settings are equal for both the CordovaLib project and your app's project. If the CordovaLib is only built for the active architecture, you will get a linker error when XCode tries to build the rest of the project for other architectures.

like image 43
Dag Høidahl Avatar answered Oct 13 '22 01:10

Dag Høidahl