c++移植IOS问题

来源:互联网 发布:js中文转unicode编码 编辑:程序博客网 时间:2024/05/17 21:06

windows : vs2010

Android: ndk-build

在 Mac 可以使用Makefile生成.a静态库(不支持动态库)或Xcode建立.a静态库工程


问题1 .生成 .a调用时出现以下问题

Ld Build/Products/Debug-iphoneos/TestDemo.app/TestDemo normal arm64    cd /Users/mac/Desktop/cpp/txprj/app/ios/TestDemo    export IPHONEOS_DEPLOYMENT_TARGET=7.1    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Users/mac/Desktop/cpp/txprj/app/ios/TestDemo/Build/Products/Debug-iphoneos -L/Users/mac/Desktop/cpp/txprj/app/ios/TestDemo -L/Users/mac/Desktop/cpp/txprj/build/ios/walnut/Build/Products/Debug-iphonesimulator -L/Users/mac/Desktop/cpp/txprj/build/ios/walnut/Build/Products/Debug-iphoneos -F/Users/mac/Desktop/cpp/txprj/app/ios/TestDemo/Build/Products/Debug-iphoneos -filelist /Users/mac/Desktop/cpp/txprj/app/ios/TestDemo/Build/Intermediates/TestDemo.build/Debug-iphoneos/TestDemo.build/Objects-normal/arm64/TestDemo.LinkFileList -dead_strip -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.1 -framework CoreGraphics -framework CoreData -lwalnut -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/mac/Desktop/cpp/txprj/app/ios/TestDemo/Build/Intermediates/TestDemo.build/Debug-iphoneos/TestDemo.build/Objects-normal/arm64/TestDemo_dependency_info.dat -o /Users/mac/Desktop/cpp/txprj/app/ios/TestDemo/Build/Products/Debug-iphoneos/TestDemo.app/TestDemoUndefined symbols for architecture arm64:  "typeinfo for twl::SortedVectorImpl", referenced from:      typeinfo for twl::SortedVector<twl::key_value_pair_t<twl::String, unsigned long> > in MainViewController.o  "typeinfo for twl::VectorImpl", referenced from:      typeinfo for twl::Vector<twl::key_value_pair_t<twl::String, twl::String> > in MainViewController.old: symbol(s) not found for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation)


Apple LLVM - Language - C++    ->    Enable C++ Runtime Types -> Yes



问题2.编译指令集在模似器用i386

问题3.Xcode include 工程下的路径问题,设置Search Path -> User Header Serach Path 

问题4.Xcode混合编译设置 Language\Compiled Source As Objective-C++


0 0
原创粉丝点击