Ios build command failed - Undefined symbols for architecture armv7 - google maps

1,002 views
Skip to first unread message

william.c...@gmail.com

unread,
Feb 27, 2015, 10:04:15 PM2/27/15
to codenameone...@googlegroups.com
I tried to build for ios target and I get the below message: 
I build with this build hints:
ios.objC=true
ios.add_libs=libc++.dylib;libicucore.dylib;libz.dylib;CoreData.framework;CoreText.framework;GLKit.framework;ImageIO.framework;SystemConfiguration.framework
ios.glAppDelegateHeader=\#import "GoogleMaps.h"
ios.newVM=true
ios.afterFinishLaunching=[GMSServices provideAPIKey\:@"MYAPIKEY"]

Is there something missing?

Ld build/Release-iphoneos/Inicio.app/Inicio normal armv7
    cd /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build1249511930189296728xxx/dist
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode6.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
    /Applications/Xcode6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build1249511930189296728xxx/dist/build/Release-iphoneos -L/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build1249511930189296728xxx/dist/Inicio-src -F/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build1249511930189296728xxx/dist/build/Release-iphoneos -filelist /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build1249511930189296728xxx/dist/build/Inicio.build/Release-iphoneos/Inicio.build/Objects-normal/armv7/Inicio.LinkFileList -dead_strip -ObjC -fobjc-link-runtime -miphoneos-version-min=6.0 -framework OpenGLES -framework CoreGraphics -framework UIKit -framework GLKit -framework Foundation -liconv -framework AdSupport -framework AddressBookUI -framework SystemConfiguration -framework MapKit -framework AudioToolbox -lxml2 -framework QuartzCore -framework AddressBook -lsqlite3 -lsqlite3.0 -framework GameKit -framework Security -framework StoreKit -framework CoreMotion -framework CoreLocation -framework MessageUI -framework MediaPlayer -framework AVFoundation -framework CoreVideo -framework QuickLook -framework iAd -framework CoreMedia -lz -lc++ -licucore -lz -framework CoreData -framework CoreText -framework GLKit -framework ImageIO -framework SystemConfiguration -lzbar -Xlinker -dependency_info -Xlinker /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build1249511930189296728xxx/dist/build/Inicio.build/Release-iphoneos/Inicio.build/Objects-normal/armv7/Inicio_dependency_info.dat -o /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build1249511930189296728xxx/dist/build/Release-iphoneos/Inicio.app/Inicio
Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_GMSPolyline", referenced from:
      objc-class-ref in com_codename1_googlemaps_InternalNativeMapsImpl.o
  "_OBJC_CLASS_$_GMSCameraPosition", referenced from:
      objc-class-ref in com_codename1_googlemaps_InternalNativeMapsImpl.o
  "_OBJC_CLASS_$_GMSMutablePath", referenced from:
      objc-class-ref in com_codename1_googlemaps_InternalNativeMapsImpl.o
  "_OBJC_CLASS_$_GMSMapView", referenced from:
      objc-class-ref in com_codename1_googlemaps_InternalNativeMapsImpl.o
  "_OBJC_CLASS_$_GMSMarker", referenced from:
      objc-class-ref in com_codename1_googlemaps_InternalNativeMapsImpl.o
  "_OBJC_CLASS_$_GMSServices", referenced from:
      objc-class-ref in CodenameOne_GLAppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
Ld build/Release-iphoneos/Inicio.app/Inicio normal armv7
(1 failure)

Shai Almog

unread,
Feb 28, 2015, 1:52:41 AM2/28/15
to codenameone...@googlegroups.com, william.c...@gmail.com
You seem to have a \ before the # in the import which indicates editing the properties file directly yet you used syntax that matches using the build hints in the GUI.
I suggest you verify that you added everything correctly and compare it to the test project.

William Castrillon

unread,
Feb 28, 2015, 8:21:08 AM2/28/15
to Shai Almog, codenameone...@googlegroups.com
hi, 
OK, I copied the commands from the configuration file but the commands are correctly written in the UI, 
so, that is no the problem, I compared my build hints with the ones in the google maps example and they are exactly the same. What else can I do to solve this issue?

thanks

Shai Almog

unread,
Feb 28, 2015, 11:09:29 AM2/28/15
to codenameone...@googlegroups.com, shai....@gmail.com, william.c...@gmail.com
Hi,
do you have a proper provisioning profile/certificate/certificate password? If those aren't defined you are redirected to fallback code that we don't test normally and might have some issues for advanced flags (e.g. ios.objC).

William Castrillon

unread,
Feb 28, 2015, 2:35:10 PM2/28/15
to Shai Almog, codenameone...@googlegroups.com
Hi, yes, everithing is ok, I have build another projects with these files and everithing were fine, so thats is not the problem :( 


Shai Almog

unread,
Feb 28, 2015, 11:48:33 PM2/28/15
to codenameone...@googlegroups.com, shai....@gmail.com, william.c...@gmail.com
A missing certificate/provisioning or password will only trigger a warning in the console and would still run in the server.
I suggest you try building the demo/test for the native apps and see that this works with your provisioning.
Reply all
Reply to author
Forward
0 new messages