xcode编译出错:Undefined symbols for architecture armv7

在xcode中编译oc和c++代码时出现如下错误:

Undefined symbols for architecture armv7
"std::basic_ostream<char, std::char_traits<char> >& std::operator<<<char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)"
"std::string::c_str() const", referenced from:
.....

基本可以断定是缺少libstdc++.6.0.9.dylib库引起的。

在Xcode中导入库就行,如图

时间: 2024-10-12 12:35:16

xcode编译出错:Undefined symbols for architecture armv7的相关文章

iOS出现 Undefined symbols for architecture armv7 std::basic_string&lt;char, std::char_traits&lt;char&gt;

Undefined symbols for architecture i386: “_OBJC_CLASS_$_XXX”, referenced from: objc-class-ref in XXX ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 如果真机调试就是 undefined symb

Undefined symbols for architecture armv7

This problem has been driving me crazy, and i can't work out how to fix it... Undefined symbols for architecture armv7: "_deflateEnd", referenced from: -[ASIDataCompressor closeStream] in ASIDataCompressor.o "_OBJC_CLASS_$_ASIDataDecompress

Undefined symbols for architecture armv7错误解决方法

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_BriefMainModel", referenced from: objc-class-ref in BriefMainViewController.o "_OBJC_CLASS_$_DDXMLDocument", referenced from: objc-class-ref in BriefDetailViewController.o objc-c

iOS工程集成支付宝错误Undefined symbols for architecture armv7

问题描述: 新工程中需要集成支付宝功能,于是咱就把支付宝的库给集成了进入然后就出现了下面这种错误了说,错误信息如下: Undefined symbols for architecture armv7: "CreateRSADataVerifier(NSString*)", referenced from: -[AppDelegate parseURL:application:] in AppDelegate.o ld: symbol(s) not found for architect

Undefined symbols for architecture armv7: &quot;std::basic_string 类型错误

导入一个静态库的时候,发现一系列错误 Undefined symbols for architecture armv7: "std::string::resize(unsigned long, char)", referenced from: 类似这样的  最后在网上找了好多文章  有这篇 http://stackoverflow.com/questions/12968369/undefined-symbols-for-architecture-armv7-when-using-zxi

XCode 6.4编译错误----Undefined symbols for architecture i386: &quot;_fwrite$UNIX2003&quot;

使用xcode在模拟器iphone4s和iphone5出现错误 编译时的错误描述: Undefined symbols for architecture i386: "_fwrite$UNIX2003", referenced from: 一开始感觉是.a文件没有单独编译i386,x86_64导致,重新编译后 lipo -info xxxx.a 发现.a文件即使支持i386,x86_64,但还是编译不通过. 网上查了一些资料后,发现解需要在工程中添加一个.c 文件 #include &

iOS:编译错误Undefined symbols for architecture i386: _OBJC_CLASS_$_XXX&quot;, referenced from: error

Undefined symbols for architecture i386: _OBJC_CLASS_$_XXX", referenced from: error 这个意思为无法找到名为XXX的类,进而还会导致一个无法连接的一个报错,只要把这个解决了就好了 既然没有这个类,我们就需要添加这个类 第一步: 选择项目文件,找到TARGETS 第二步: 选择 Build Phases 第三步: 选择 Compile Sources 第四步: 添加 XXX.m 类(切记,添加的是.m文件) 然后可能

cocoapods Undefined symbols for architecture armv7: referenced from:

开开心心的从网上导个库,提示 很伤心有没有,到这个下面 点+号加库,看看有没有这种 把带libPods的加进去就ok 了

Xcode编译Undefined symbols for architecture xxx 错误总结

每次遇到这种错误就头痛,不知道要害死多少脑细胞了,就在这里做个总结吧 可能会遇到这几种错误:Undefined symbols for architecture armv7Undefined symbols for architecture armv7sUndefined symbols for architecture arm64Undefined symbols for architecture i386Undefined symbols for architecture x86_64 错误