您的位置:首页 > 移动开发 > IOS开发

关于iOS中的一些错误集

2014-01-13 12:33 155 查看
1、 duplicate symbols for architecture i386

    我的解决方法是:删掉最近添加的变量,可能该变量与SDK中的变量出现重名了,

                                   其实问题出现在,与C++混编时,.hpp文件的C++代码,不能写有关类的实现

2、添加静态库.a,在Application工程中build setting 界面

       ①要修改Header Search Paths 设置为$(BUILD_PRODUCTS_DIR)

       ②Linking一栏下,Other Linker Flags 需要设置为
-ObjC


      ③在工程中添加include的头文件,并有 “ ” 来进行引用 

3、添加静态库后,出现类似下面有关std错误

         

Undefined symbols for architecture armv7:
"std::basic_ostream<char, std::char_traits<char> >& std::operator<<<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from:
zxing::qrcode::Detector::computeDimension(zxing::Ref<zxing::ResultPoint>, zxing::Ref<zxing::ResultPoint>, zxing::Ref<zxing::ResultPoint>, float) in libZXingWidget.a(Detector-B8B28E953F840D47.o)

Undefined symbols for architecture armv7:
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)", referenced from:
zxing::Exception::Exception(char const*) in libZXingWidget.a(Exception.o)
zxing::common::StringUtils::guessEncoding(unsigned char*, int, std::map<unsigned int, std::string, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::string> > >


      将target中的 "Apple
LLVM Compiler 5.0 - Language - C++" 下面的 "C++ standard library". 改为"Compiler Default".

4、出现如下类似的错误

     

Undefined symbols for architecture armv7:
"_SSLGetBufferedReadSize", referenced from:
___33-[GCDAsyncSocket flushSSLBuffers]_block_invoke_0 in GCDAsyncSocket.o
-[GCDAsyncSocket doReadData] in GCDAsyncSocket.o
"_SSLSetIOFuncs", referenced from:
-[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
"_SSLRead", referenced from:
-[GCDAsyncSocket flushSSLBuffers] in GCDAsyncSocket.o


     需要添加SecurityFramework

5、出现

     “

The identity used to sign the executable is no longer valid.

Please verify that your device’s clock is properly set, and that your signing certificate is not expired.

”  错误,即没有证书,这时如果设备已经越狱 ,要确保安装了AppSync,在Cydia中下载。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ios 错误