Marmalade iOS多架构支持

时间:2014-04-07 11:45:21

标签: ios architecture marmalade

从官方站点构建marmalade扩展静态lib-wrappers的说明显示了如何仅构建单一体系结构(armv6)扩展。我试图在项目中加入许多架构:

if {{defined I3D_OS_IPHONE}}
{
    includepath incoming

    files
    {
    ["MyTracker Library armv7"]
    (incoming/armv7)
    "*.o"

    ["MyTracker Library armv7s"]
    (incoming/armv7s)
    "*.o"

    ["MyTracker Library armv64"]
    (incoming/armv64)
    "*.o"    

        ["source"]
        (use_first_found, source/iphone, source/generic)
        MyTracker_platform.mm
        #Add any iphone-specific files here
    }
}

但是在尝试构建它之后我收到了很多错误消息:

Executing: '/usr/local/bin/scons -Q compiler=clang'

scons: warning: Support for pre-2.7.0 Python version (2.6.8) is deprecated.
    If this will cause hardship, contact dev@scons.tigris.org.
File "/usr/local/bin/scons", line 192, in <module>
Librarian [ar] /Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib: archive member: /Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a(MyDispatcher.o) cputype (7) does not match previous archive members cputype (12) (all members must match)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib: archive member: /Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a(MyTracker.o) cputype (16777223) does not match previous archive members cputype (12) (all members must match)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib: archive member: /Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a(MyNetwork.o) cputype (16777228) does not match previous archive members cputype (12) (all members must match)

....

malformed object (unknown load command 1)
ar: internal ranlib command failed
scons: *** [/Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a] Error 1
Executing 'scons -Q' failed. (return code 2). Retry
error: Executing 'scons -Q' failed. (return code 2)
FAILED (error code=3)

如何构建具有多种架构支持的扩展?

2 个答案:

答案 0 :(得分:0)

正在重构多个目标的构建。我的理解是,在某个阶段,文档和底层代码都已陈旧。我相信这种方法与你要做的事情有很大的不同 - 我不确定你为什么要加入.o文件,但通常在橘子酱中效果不错。

答案 1 :(得分:0)

这通常不是处理此问题的建议方法。你看起来像是在尝试从这些库中引入符号,这是EDK不支持的。您最好的选择是在部署时包括这些库(或者很可能只是arm6 / 7库,具体取决于您想要的低多少)以及编译后的扩展,而是使用头文件编译扩展(或者由您正在使用的任何SDK的开发人员提供,或者您编写的用于编译这些.o libs的SDK。