[英]"emcc" command does not recognized
I'm having issue with building this demo.我在构建此演示时遇到问题。 https://github.com/kakukogou/opencvjs_demo_segmentation
https://github.com/kakukogou/opencvjs_demo_segmentation
When i cd into this folder and run make command i get this error message:当我 cd 进入此文件夹并运行 make 命令时,我收到此错误消息:
/bin/sh: 1: emcc: not found
make: *** [segmentation] Error 127
This is how make file looks like.这就是make文件的样子。
segmentation: ../src/segmentation.cpp ../src/export.cpp
mkdir -p $(OBJDIR)
emcc \
../src/segmentation.cpp \
../src/export.cpp \
-I $(OPENCV_INSTALL_DIR)/include \
$(OPENCV_INSTALL_DIR)/lib/libopencv_core.so \
$(OPENCV_INSTALL_DIR)/lib/libopencv_imgproc.so \
-s EXPORTED_FUNCTIONS="['_on_mouse', '_on_init', '_on_process']" \
-O3 \
--llvm-lto 1 \
--closure 1 \
-s PRECISE_F32=1 \
-s FORCE_ALIGNED_MEMORY=1 \
-s TOTAL_MEMORY=306777216 \
-o ./bin/segmentation.js
clean:
rm ./bin/*.js ./bin/*.mem
Is there any issue with my environment variables.我的环境变量有什么问题吗? What is the proper way to compile this ?
编译这个的正确方法是什么?
For whatever reason default path configurations in .emscripten does not enable emcc in terminal.无论出于何种原因, .emscripten中的默认路径配置都不会在终端中启用 emcc。 so i manually set the EMSCRIPTEN_ROOT in /etc/environment and now it recognizes the emcc command in terminal.
所以我在/etc/environment中手动设置了 EMSCRIPTEN_ROOT,现在它可以识别终端中的 emcc 命令。
对于 Windows,在“emsdk”文件夹(从“git clone https://github.com/emscripten-core/emsdk.git ”下载)运行:
./emsdk activate latest --permanent
this works for me这对我有用
adding添加
source ./emsdk_env.sh
to .bashrc
or .zshrc
file source ./emsdk_env.sh
到.bashrc
或.zshrc
文件
Encounter same problem in window 11在窗口 11中遇到同样的问题
In my case there was problem with path of EMSDK
就我而言,
EMSDK
的路径存在问题
After running emsdk_env.bat
运行
emsdk_env.bat
后
I have check path in environment variable and I found it was E:/emsdk
我检查了环境变量中的路径,发现它是
E:/emsdk
Then I have changed it to E:\emsdk
然后我把它改成了
E:\emsdk
Now working fine for me现在对我来说很好
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.