简体   繁体   English

在Xcode中进行增强时遇到麻烦

[英]Having some trouble with boost in Xcode

When I use boost ,I have some trouble.It can run in mobile phone,but not iphone simulator.This is some error message. 当我使用boost时,我遇到了一些麻烦。它可以在手机中运行,但不能在iphone模拟器中运行。这是一些错误消息。

ld: in /Users/7road/Documents/sdk/libboost_system.a(error_code.o), building for iOS simulator, but linking in object file built for OSX, for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation). ld:在/Users/7road/Documents/sdk/libboost_system.a(error_code.o)中,针对iOS模拟器而构建,但是对于为OSX而生成的对象文件,对于架构x86_64 clang进行链接:错误:链接器命令失败,退出代码为1(使用-v查看调用)。

I use 'otool -lv libboost_system.a' to find some message. 我使用'otool -lv libboost_system.a'查找一些消息。 It don't have LC_VERSION_MIN_IPHONES. 它没有LC_VERSION_MIN_IPHONES。 But I don't know how to solve it.Please help me,thanks. 但是我不知道如何解决。谢谢。

Since Xcode 7 you have to specify the target for the architecture library. 从Xcode 7开始,您必须指定架构库的目标。 These commands have to be passed in the compilation: 这些命令必须在编译中传递:

iOS Device Target: iOS设备目标:

-miphoneos-version-min=7.0

I have an updated boost library that works with the latest Xcode here: 我有一个更新的boost库,可以在这里使用最新的Xcode:

  • It currently has arm64, armv7, i386, x86_64 当前具有arm64,armv7,i386,x86_64
  • Boost 1.59.0 or previous 提升1.59.0或更早版本
  • libc++ / std=c++11 -- Now optional release for libstdc++ libc ++ / std = c ++ 11-现在是libstdc ++的可选版本
  • Precompiled and Script to build yourself (so if you need libstdc++ quite easy to change) 预编译和脚本来构建自己(因此,如果您需要libstdc ++相当容易更改)
    • Supports Xcode 7 支持Xcode 7

[ https://github.com/danoli3/ofxiOSBoost][1] [ https://github.com/danoli3/ofxiOSBoost][1]

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

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