简体   繁体   English

Apple LLVM编译器错误4.1 [-stdlib = libc ++的无效部署目标]

[英]Apple LLVM Compiler Error 4.1 [invalid deployment target for -stdlib=libc++]

Can Any one Tell me how to solve this Error... My X-Code is Version 4.5. 谁能告诉我如何解决此错误...我的X代码是4.5版。 My IOS Simulator is Version 4.3 我的IOS Simulator是版本4.3

clang: error: invalid deployment target for -stdlib=libc++ (requires iOS 5.0 or later)

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1 命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang失败,退出代码为1

In your case, Your Project is not support your default deployment target so, you need to change it ( if 5.0 deployment target not available then update your system ) 在您的情况下,您的项目不支持默认的deployment target因此,您需要对其进行更改( 如果5.0部署目标不可用,请更新您的系统

This Screen Shot describe how to change deployment target: 此屏幕快照描述了如何更改部署目标:

在此处输入图片说明

All Step ( For Change deployment target ) are i added to this screen shot. 我将所有步骤( 用于Change deployment target )添加到此屏幕快照中。

1) Select Project From your Project Navigation Bar 1)从项目导航栏中选择项目
2) Select Project Targets 2)选择项目目标
3) select Summary tab 3)选择摘要标签
4) select and change Deployment Target. 4)选择并更改部署目标。

Projects created using Xcode 4.5 use libc++ implementation of the standard C++ library. 使用Xcode 4.5创建的项目使用标准C ++库的libc ++实现。 But the libc++ library is available only on iOS 5.0 and later, So, if you want to enable deployment on earlier releases of iOS in your project, set the C++ Standard Library build setting to libstdc++ (Gnu C++ standard library). 但是libc ++库仅在iOS 5.0和更高版本上可用,因此,如果要在项目中的iOS早期版本上启用部署,请将C ++标准库构建设置设置为libstdc ++(Gnu C ++标准库)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM