我正在尝试在Ubuntu上安装Emscripten,但是the official installation guide for Emscripten没有提供在Linux上安装Emscripten的任何说明。安装指南提供的唯一建议是:
If you are on Linux, things should be very simple for you and there is no need for any additional guide.
我也读过Emscripten存储库中的README.md文件,它也没有提供任何针对Ubuntu的说明。为了在Ubuntu上设置Emscripten,我需要遵循哪些步骤?
发布于 2013-02-16 19:06:48
为了开始使用clang 3.2,我假设你运行的是Ubuntu 12.10。13.04已经打包了clang 3.2,所以我建议使用这些包。
有两种方法可以获得它们:
- Add `deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse` to your sources.
- Update your package info (e.g. `sudo apt-get update`)
- Install only the needed package and dependencies (e.g. `sudo apt-get install clang-3.2`)
- Disable the source entry, added before.
从
编辑:
更新到当前状态。
发布于 2013-02-17 04:10:33
对于Ubuntu 12.04来说,这也非常简单。
~/opt/dev/llvmPATH="$PATH:/home/[your_profile]/opt/dev/llvm/clang3.2/bin".profile的说明
这就是全部
如果你得到了/usr/include/features.h:324:10: fatal error: 'bits/predefs.h' file not found,只需安装sudo apt-get install libc6-dev-i386
发布于 2015-09-13 09:46:08
Emscripten是一个复杂的软件工具系统,支持多种平台。对于这类系统,入门指令可能有点晦涩难懂。第一个令人遗憾的是just installing emscripten from the Ubuntu repos probably isn't your best bet,至少现在是这样。
通过下载Portable Emscripten SDK for Linux and OS X并从包含的README.md文件中执行以下步骤,我获得了所需的大部分内容:
/emsdk update。这将获取可用工具的最新注册表。./emsdk install latest。这将下载并安装最新的SDK工具。./emsdk activate latest。这会将~/.emscripten设置为指向SDK。请注意,初始下载很小,但运行上面的步骤需要一段时间(大约一个小时,但可能取决于互联网速度),并使用大约13G的磁盘空间。
我发现我还需要安装(在Ubuntu 14.04 LTS上):
apt-get install nodejs-legacy可能还需要其他依赖项,希望根据您看到的错误消息可以很容易地找到这些依赖项。
下面是一个简单的示例,说明如何构建和运行C++程序:
emsdk_portable/emscripten/tag-1.34.8/em++ hello.cpp -o temp.html
chromium-browser --new-window temp.htmlhttps://stackoverflow.com/questions/14902514
复制相似问题