【问题标题】:Xcode gives error while using Python.framework in iOS ,undefined symbol for architecture i386Xcode 在 iOS 中使用 Python.framework 时出错,架构 i386 的未定义符号
【发布时间】:2016-10-23 23:06:38
【问题描述】:

架构 i386 的未定义符号:

“_PyInt_AsLong”,引用自: _main in main.o

“_PyInt_FromLong”,引用自: _main in main.o

“_PyString_FromString”,引用自: _main in main.o

ld:未找到体系结构 i386 的符号 铿锵声:错误:

链接器命令失败,退出代码为 1(使用 -v 查看调用)

【问题讨论】:

标签: python ios objective-c xcode


【解决方案1】:

替换

  1. PyUnicode_AsUTF8 或 PyUnicode_FromString 用于 _PyString_FromString
  2. PyLong_AsLong 为 _PyInt_AsLong
  3. PyLong_FromLong 为 _PyInt_FromLong

解决了我的问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-12-08
    • 1970-01-01
    • 2012-02-09
    • 1970-01-01
    • 2011-08-14
    相关资源
    最近更新 更多