• 百度地图在某架构下找不到符号.a文件的问题


     

    1.现象:

    就是说找不到符号给i386的架构(就是模拟器)。或者找不到符号给arm架构(真机)。

    ld: warning: ignoring file /Users/pufang/xcode/demo/baidumap/lib/libs/Release-iphoneos/libbaidumapapi.a, missing required architecture i386 in file
    Undefined symbols for architecture i386:
      "_OBJC_CLASS_$_BMKMapManager", referenced from:
          objc-class-ref in BaiduMapApiDemoAppDelegate.o
      "_OBJC_METACLASS_$_BMKPointAnnotation", referenced from:
          _OBJC_METACLASS_$_RouteAnnotation in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPointAnnotation", referenced from:
          _OBJC_CLASS_$_RouteAnnotation in RouteSearchDemoViewController.o
          objc-class-ref in AnnotationDemoViewController.o
          objc-class-ref in GeocodeDemoViewController.o
          objc-class-ref in PoiSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKSearch", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
          objc-class-ref in GeocodeDemoViewController.o
          objc-class-ref in PoiSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKAnnotationView", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPolyline", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPolylineView", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPlanNode", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPinAnnotationView", referenced from:
          objc-class-ref in AnnotationDemoViewController.o
          objc-class-ref in GeocodeDemoViewController.o
          objc-class-ref in PoiSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKCircle", referenced from:
          objc-class-ref in OverlayDemoViewController.o
      "_OBJC_CLASS_$_BMKCircleView", referenced from:
          objc-class-ref in OverlayDemoViewController.o
      "_OBJC_CLASS_$_BMKOfflineMap", referenced from:

    2.问题:

    库搜索路径指定不对或者将arm和i386的库都包含了。


    3.解决方法:

    找到Library Search Paths部分,删除多余的路径或者添加合适的路径。


    4.参考:

    http://0.zhouguangwu.duapp.com/detail.php?id=674


    Pubdate:2012-9-11 3:28(PM)

    吧上面那个删除了就搞定了

    ld: warning: directory not found for option '-L/work/svn/mapsdk/iphone/baidumapapi/build/Release-iphonesos'
    ld: warning: ignoring file /Users/pufang/xcode/demo/baidumap/lib/libs/Release-iphoneos/libbaidumapapi.a, missing required architecture i386 in file
    Undefined symbols for architecture i386:
      "_OBJC_CLASS_$_BMKMapManager", referenced from:
          objc-class-ref in BaiduMapApiDemoAppDelegate.o
      "_OBJC_METACLASS_$_BMKPointAnnotation", referenced from:
          _OBJC_METACLASS_$_RouteAnnotation in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPointAnnotation", referenced from:
          _OBJC_CLASS_$_RouteAnnotation in RouteSearchDemoViewController.o
          objc-class-ref in AnnotationDemoViewController.o
          objc-class-ref in GeocodeDemoViewController.o
          objc-class-ref in PoiSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKSearch", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
          objc-class-ref in GeocodeDemoViewController.o
          objc-class-ref in PoiSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKAnnotationView", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPolyline", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPolylineView", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPlanNode", referenced from:
          objc-class-ref in RouteSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKPinAnnotationView", referenced from:
          objc-class-ref in AnnotationDemoViewController.o
          objc-class-ref in GeocodeDemoViewController.o
          objc-class-ref in PoiSearchDemoViewController.o
      "_OBJC_CLASS_$_BMKCircle", referenced from:
          objc-class-ref in OverlayDemoViewController.o
      "_OBJC_CLASS_$_BMKCircleView", referenced from:
          objc-class-ref in OverlayDemoViewController.o
      "_OBJC_CLASS_$_BMKOfflineMap", referenced from:

        BMKMapManager *mapManager = [[BMKMapManager alloc]init];
        [mapManager start:@"C45642BBD6852AEF5D3240C59F6C8CFE207AF843" generalDelegate:self];必须加上这行, 不然会一团黑


  • 相关阅读:
    4-vim-工作模式-01-职责以及切换模式
    3-vim-打开和新建文件-02-删除交换文件
    poj1011Stick(dfs+剪枝)
    POJ 1251 Jungle Roads (prim)
    poj 2502 Subway
    poj 3624 Charm Bracelet (01背包)
    拦截导弹问题(动态规划)
    Policy Gradient
    深入了解马尔科夫决策过程(Markov Decision Process)
    深度学习中调参对模型容量的影响
  • 原文地址:https://www.cnblogs.com/jiangu66/p/3186976.html
Copyright © 2020-2023  润新知