Reputation: 8836
I'm using zipArchive library in Xcode to integrate into my project to do unzip operation. And I got following compile error message. my question is how can i resolve this compile issue?
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Compiled error with error message : invalid deployment target for -stdlib=libc++ (requires iOS 5.0 or later)
What version of the product are you using? On what operating system?
mac, xcode4.5.1, iphone4.3 simulator (it's OK in iOS6)
Upvotes: 1
Views: 1279
Reputation: 539765
The file ZipArchive.mm
from the ziparchive project has the suffix .mm
for Objective-C++ files. However, the file does not seem to contain any C++ code. After renaming it to ZipArchive.m
I could compile it even for iOS 4.3 deployment target.
A different solution of the problem can be found in the Xcode 4.5 Release Notes:
Projects created using this Xcode release use the new libc++ implementation of the standard C++ library. The libc++ library is available only on iOS 5.0 and later and OS X 10.7 and later.
To enable deployment on earlier releases of iOS and OS X in your project, set the C++ Standard Library build setting to libstdc++ (Gnu C++ standard library).
Upvotes: 2