c++ - Swift Compiler Error 'iostream' not found -
i've tried implement project i've found on github.
https://github.com/hossamghareeb/facebook-pop-tutorial
while implementing .h , .m files i've got error saying xcode not find 'iostream' file.
i'm working in swift, using bridging-headers use framework. when try build original project works, mine fails.
how can add iostream file?
thanks in advance!
swift bridging not support objective c++ files. means headers consume or expose c++ entites (like std::vector
; std::iostream
) cannot added bridging header.
the pop bridging header contains:
#import "pop.h"
you should #import
file in own bridging header, rather trying #import
.h
files.
if need consume of api that's defined in .mm
files isn't exposed objective c or plain c header, you'll have make own header file exposes (and back-end implements you've exposed).
the reason why can use .mm
files in library that's being used swift because swift uses interface files - i.e. .h
files, , long files in plain c or objective c, can make use of code implemented in .mm
file. .mm
files compiled objective c++ compiler (clang++
)
Comments
Post a Comment