[英]importing iOS-QR-Code-Generator files in an objective-c project : c++ classes dont compile
We tried to import in our project the code to generate QRCode iOS-QR-Code-Generator from Kuapay Although we linked correctly the libpng folder (the #include is found), we have errors on compilation of the qr_ classes the eror is as follow for by example QR_Encode.h the class keyword is nor recognized, it seems the project doesn't recognize the file as a c++ file, being an objective-c project Anyone could help us? 我们试图在我们的项目中导入代码以从Kuapay生成QRCode iOS-QR-Code-Generator尽管我们正确链接了libpng文件夹(找到了#include),但是在编译qr_类时出现错误,错误如下例如,QR_Encode.h的class关键字未被识别,看来该项目无法将文件识别为c ++文件,这是一个Objective-C项目,有人可以帮助我们吗? Many thanks in advance
提前谢谢了
If the header file contains C++ classes, you'll need to compile the file #include
ing it as C++ or Objective-C++. 如果头文件包含C ++类,则需要编译文件
#include
,将其作为C ++或Objective-C ++。 If you have a .m
file including it, the easiest way to do this is to change the extension to .mm
如果您包含一个
.m
文件,执行此操作的最简单方法是将扩展名更改为.mm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.