zoukankan      html  css  js  c++  java
  • 百度地图,规划路径,填坑

    下载根据官网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++混编。但是还是想问下出现这种问题的原因?

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



  • 相关阅读:
    [UE4]创建对象的的几种姿势(C++)
    [UE4]IES光源概述文件
    [UE4]C++ STL总结
    [UE4]C++中引用(&)的用法和应用实例
    [UE4]单映射:TMap容器,字典表
    [UE4]集合:TSet容器
    [UE4]动态数组:TArray容器
    [UE4] 虚幻4学习---UE4中的字符串转换
    [UE4]使用PlayerController获取鼠标点击时的坐标
    [UE4]C 语言动态数组
  • 原文地址:https://www.cnblogs.com/tufei7/p/7740517.html
Copyright © 2011-2022 走看看