2012-04-05 48 views
2

「-nostdsysteminc」我通過教程這裏emscripten閱讀 - https://github.com/kripken/emscripten/wiki/Tutorial錯誤:未知參數:在Emscripten

到目前爲止,我已經下載了源和安裝的依賴,並設置我的.emscripten設置適當的文件。

具體設置如下:

# 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] 

但是當我運行EMCC在一個測試程序,它是在用下面的命令測試目錄:

./emcc tests/hello_world.cpp 

我收到錯誤:

error: unknown argument: '-nostdsysteminc' 
emcc: compiler frontend failed to generate LLVM bitcode, halting 

我無法理解爲什麼會發生此錯誤。

回答

1

這很可能是您使用3.0版之前的叮噹聲版本。

要檢查您的版本,運行:

clang --version 

我發現我的版本是2.8,因爲我已經通過安裝apt-get的在Ubuntu 11.04;一旦我更新到鏗鏘3.0,這個錯誤消失。

戴夫。

+0

現在你需要CLANG 3.1。 – abergmeier 2012-06-17 23:38:54