【问题标题】:AssertionError: asm.js requires -O1 or aboveAssertionError: asm.js 需要 -O1 或以上
【发布时间】:2014-01-10 05:31:50
【问题描述】:

我刚启动 asm.js 并停留在某一时刻。我已经安装了 emscripten、clang 和 node js,并且我的 c 程序也可以使用 emscripten 运行良好:

./emcc hello_world.c

./emcc hello_world.c -o hello_world.html

但是当我尝试使用 asm 运行此文件时,它会显示此命令的插入错误:

./emcc -01 -s ASM_JS=1 hello_world.c

Traceback (most recent call last):
File "./emcc", line 1219, in <module>
assert opt_level >= 1 or fastcomp, 'asm.js requires -O1 or above
AssertionError: asm.js requires -O1 or above

那么如何解决这个错误呢?

,提前致谢

【问题讨论】:

    标签: javascript emscripten asm.js


    【解决方案1】:

    做的时候应该没问题

    ./emcc -02 -s ASM_JS=1 hello_world.c
    

    【讨论】:

      猜你喜欢
      • 2021-12-03
      • 1970-01-01
      • 2016-03-30
      • 1970-01-01
      • 2015-07-14
      • 2015-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多