Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iostream not found in Xcode

Tags:

ios

zxing

I have problem including ZXing in my App. I get error: "iostream file not found". I have done everything like in ZXing instruction but i can't get this working. I'm including this in .mm file. I use story boards this project is for iOS 6.0 This is error i get:

In file included from /Users/adam/Developer/project/project/SecondViewController.mm:11: In file included from zxing/iphone/ZXingWidget/Classes/QRCodeReader.h:10: In file included from zxing/iphone/ZXingWidget/Classes/FormatReader.h:22: zxing/cpp/core/src/zxing/common/Counted.h:23:10: fatal error: 'iostream' file not found

Any idea what can i do to get this working?

EDIT:

When i select Compile Source File As Objcetive-C++ project comiples without issues, BUT as i was told this is not god soultion beacuse this can make some problems later on with other parts of app.

like image 614
Adam Szeptycki Avatar asked Dec 13 '12 10:12

Adam Szeptycki


People also ask

Is #include iostream a library?

That is a C++ standard library header file for input output streams. It includes functionality to read and write from streams.

What is iostream header file?

iostream: iostream stands for standard input-output stream. This header file contains definitions of objects like cin, cout, cerr, etc. iomanip: iomanip stands for input-output manipulators. The methods declared in these files are used for manipulating streams. This file contains definitions of setw, setprecision, etc.


1 Answers

Just rename your implementation file with .mm extension instead of .m solve the issue.

like image 96
Spawnrider Avatar answered Sep 27 '22 19:09

Spawnrider