user1184785
user1184785

Reputation: 1

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? Many thanks in advance

Upvotes: 0

Views: 423

Answers (1)

JeremyP
JeremyP

Reputation: 86651

If the header file contains C++ classes, you'll need to compile the file #includeing it as C++ or Objective-C++. If you have a .m file including it, the easiest way to do this is to change the extension to .mm

Upvotes: 1

Related Questions