c - 找不到 emmake 和 emconfigure 命令 (osx)

标签 c cmake emscripten emmake

我正在尝试将 CMake 与 Emscripten 结合使用。我关注了this official tutorial , 克隆 repo 协议(protocol):

git clone https://github.com/emscripten-core/emsdk.git

我做到了:

./emsdk install latest
./emsdk activate latest

一般来说,emcc 似乎可以正常工作。现在我转到this tutorial它告诉我使用:

./emconfigure ./configure
./emmake make

不幸的是,emconfigureemmake 似乎不在我的 PATH 上。我也无法在我之前克隆的 emsdk 存储库中找到它们。我是否漏掉了一些明显的东西?

最佳答案

您忘记了 Installation Instructions 中的最后一步您链接的教程(下面以粗体显示):

# Fetch the latest version of the emsdk (not needed the first time you clone)
git pull

# Download and install the latest SDK tools.
./emsdk install latest

# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest

<b># Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh</b>

这应该允许在当前终端 session 中识别 emconfigureemmake

关于c - 找不到 emmake 和 emconfigure 命令 (osx),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62557114/

相关文章:

c++ - 当我在调用project()之前设置(CMAKE_EXECUTABLE_SUFFIX)时,CMake中的Emscripten不会输出html文件。为什么?我该如何修复它?

c - 如何从 C 执行 Bash 程序?

testing - 在 cmake 中禁用测试

C - 循环后释放字符串

c++ - 使用 Google Test 编译程序时出现 "g++ is not a full path"

CMakeList 从特定文件夹下的 .proto 文件生成 .cc 和 .h 文件

javascript - 未捕获的 TypeError : Module. cwrap 不是函数

javascript - 如何从 webworker 中取消 wasm 进程

c - Linux 上的 Breakpad 测试示例错误

c++ - GridWalk CodeEval 实现问题