【问题标题】:protobuf 3.0.0 in xcode with error: thread-local storage is unsupported for the current targexcode 中的 protobuf 3.0.0 错误:当前目标不支持线程本地存储
【发布时间】:2015-05-15 09:13:17
【问题描述】:

我试图在我的objective-c项目中使用protobuf 3.0.0,当我编译protobuf项目时,出现错误:

“当前目标不支持线程本地存储。”

因为protobuf在代码中使用了“__thread”,可能xcode编译器不支持这个字符。

谁能告诉我如何解决这个问题?

【问题讨论】:

标签: objective-c xcode protocol-buffers


【解决方案1】:

protobuf 源代码在 xcode 中编译为 c++,

这是我的设置:

Apple LLVM 6.0 - Language:
C Language Dialect    GNU99 [-std=gnu99]
Compile Source As     According To File Type


Apple LLVM 6.0 Language - C++:
C++ Language Dialect   GNU++[-std=gnu++11]
C++ standard Library   libc++(LLVM C++ standard library with c++11 support)

这里是设置链接: xcode setting snap

【讨论】:

  • 这里没有乐趣。仍然遇到这个问题,尽管它现在是 LLVM 9.0
猜你喜欢
  • 2021-12-28
  • 2011-05-03
  • 1970-01-01
  • 2018-02-19
  • 1970-01-01
  • 2013-05-01
  • 1970-01-01
  • 1970-01-01
  • 2022-12-02
相关资源
最近更新 更多