search

Home  >  Q&A  >  body text

ios - iphone项目导入百度地图后出现错误(见详情)

导入百度地图需要下面的操作:

静态库中采用ObjectC++实现,因此需要您保证您工程中至少有一个.mm后缀的源文件(您可以将任意一个.m后缀的文件改名为.mm),或者在工程属性中指定编译方式,即将Xcode的Project -> Edit Active Target -> Build -> GCC4.2 - Language -> Compile Sources As设置为"Objective-C++"

当我设置之后,编译不过,因为在项目中引入mantle这个类库,提示了如下的错误(省略了一些不必要的):

In file included from /Users/YSQ/Desktop/TransunerOA/TransunerOA/Models/WAInfoModel.h:10:
/Users/YSQ/Desktop/TransunerOA/TransunerOA/Vendors/Mantle/MTLJSONAdapter.h:45:69: error: expected identifier
- (NSValueTransformer *)transformerForModelPropertiesOfClass:(Class)class;
                                                                    ^
/Users/YSQ/Desktop/TransunerOA/TransunerOA/Vendors/Mantle/MTLJSONAdapter.h:45:69: error: expected ';' after method prototype
- (NSValueTransformer *)transformerForModelPropertiesOfClass:(Class)class;

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

是否因为该类库引用了class关键字?
该如何修复?

大家讲道理大家讲道理2767 days ago842

reply all(1)I'll reply

  • 阿神

    阿神2017-04-17 13:01:44

    I also want to know

    reply
    0
  • Cancelreply