• 百度地图,规划路径,填坑


    下载根据官网demo, 比搜索出来的结果块多了, 而且人家代码特别规范

    BMKMapPoint * temppoints = new BMKMapPoint[planPointCounts];

    我按照解决方案把类的后缀改为了.mm文件 在build settings ->Other Linker Flags中添加了-ObjC 但是编译时还是报错

    @import UIKit;
    @import Foundation;
    @import CoreGraphics;
    @import StoreKit;
    @import CoreLocation;
    @import AssetsLibrary;
    @import MobileCoreServices;
    @import WebKit;

    use of '@import' when c   modules are disabled, consider using fmodules and fcxx-modules
    改成 下面这样就好了
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    #import <CoreGraphics/CoreGraphics.h>
    #import <StoreKit/StoreKit.h>
    #import <CoreLocation/CoreLocation.h>
    #import <AssetsLibrary/AssetsLibrary.h>
    #import <MobileCoreServices/MobileCoreServices.h>
    #import <WebKit/WebKit.h>
    其实stackOverflow上都说了:

    To explicitly use modules:

    
    

    Replace #import <Cocoa/Cocoa.h> with @import Cocoa;

    https://stackoverflow.com/questions/18947516/import-vs-import-ios-7

    百度地图SDK官网论坛也有说:

    http://bbs.lbsyun.baidu.com/forum.php?mod=viewthread&tid=130914&highlight=new%2BBMKMapPoint

    bug已经解决了,但是情况说一下。我是把pch文件里面import文件全部移除。就不会有问题了,应为没有做过oc与c++混编。但是还是想问下出现这种问题的原因?

    看到这个,我才想到,可能是我的头文件有问题,我改一下就好了



  • 相关阅读:
    redis 学习(一)
    spring 学习总结(一)
    Struts2 学习(三)
    Python3 高级特性
    Python3 模块
    Python3 函数式编程
    Python3 函数
    Python3 列表
    Python3 字符编码
    Java Servlet 回顾
  • 原文地址:https://www.cnblogs.com/tufei7/p/7740517.html
Copyright © 2020-2023  润新知