zoukankan      html  css  js  c++  java
  • 百度地图在某架构下找不到符号.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];必须加上这行, 不然会一团黑


  • 相关阅读:
    币值转换
    抓老鼠啊~亏了还是赚了?
    第十二周作业
    第十一周作业
    第十周作业
    第九周作业
    第八周作业
    第七周作业
    第五周实验报告和总结
    第四次实验报告及总结
  • 原文地址:https://www.cnblogs.com/jiangu66/p/3186976.html
Copyright © 2011-2022 走看看