首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误: Emscripten中的未知参数:'-nostdsysteminc‘

错误: Emscripten中的未知参数:'-nostdsysteminc‘
EN

Stack Overflow用户
提问于 2012-04-06 03:49:23
回答 1查看 637关注 0票数 3

我正在通读emscripten的教程-- https://github.com/kripken/emscripten/wiki/Tutorial

到目前为止,我已经下载了源代码,安装了依赖项,并适当地设置了我的.emscripten设置文件。

以下是设置:

代码语言:javascript
复制
# This file will be copied to ~/.emscripten if that file doesn't exist. Or, this is     that copy.
# IMPORTANT: Edit the *copy* with the right paths!

#EMSCRIPTEN_ROOT = os.path.expanduser('~/Dev/emscripten') # this helps projects using emscripten find it
EMSCRIPTEN_ROOT = os.path.expanduser('~/softwares/kripken-emscripten-12e45ea')

#LLVM_ROOT = os.path.expanduser('~/Dev/llvm-3.0/cbuild/bin')
LLVM_ROOT = os.path.expanduser('/usr/bin')

# See below for notes on which JS engine(s) you need
NODE_JS = 'node'
SPIDERMONKEY_ENGINE = [os.path.expanduser('~/Dev/mozilla-central/js/src/js'), '-m', '-n']
V8_ENGINE = os.path.expanduser('~/Dev/v8/d8')

TEMP_DIR = '/tmp'


########################################################################################################


# Pick the JS engine to use for running the compiler. This engine must exist, or
# nothing can be compiled.
#
# Recommendation: If you already have node installed, use that. Otherwise, build v8 or
#                 spidermonkey from source. Any of these three is fine, as long as it's
#                 a recent version (especially for v8 and spidermonkey).

COMPILER_ENGINE = NODE_JS
#COMPILER_ENGINE = V8_ENGINE
#COMPILER_ENGINE = SPIDERMONKEY_ENGINE


# All JS engines to use when running the automatic tests. Not all the engines in this list
# must exist (if they don't, they will be skipped in the test runner).
#
# Recommendation: If you already have node installed, use that. If you can, also build
#                 spidermonkey from source as well to get more test coverage (node can't
#                 run all the tests due to node issue 1669). v8 is currently not recommended
#                 here because of v8 issue 1822.

JS_ENGINES = [NODE_JS, SPIDERMONKEY_ENGINE]

但是,当我使用以下命令在test目录中的测试程序中运行emcc时:

代码语言:javascript
复制
./emcc tests/hello_world.cpp

我得到了一个错误:

代码语言:javascript
复制
error: unknown argument: '-nostdsysteminc'
emcc: compiler frontend failed to generate LLVM bitcode, halting

我不能理解为什么会发生这个错误。

EN

回答 1

Stack Overflow用户

发布于 2012-04-16 02:49:45

很可能您使用的clang版本早于3.0。

要检查您的版本,请运行:

代码语言:javascript
复制
clang --version

我发现我的版本是2.8,因为我是通过apt-get在Ubuntu 11.04上安装的;一旦我更新到clang 3.0,这个错误就消失了。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10035045

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档