Skip to content

“emcc” command does not recognized

I’m having issue with building this demo.

When i cd into this folder and run make command i get this error message:

/bin/sh: 1: emcc: not found
make: *** [segmentation] Error 127

This is how make file looks like.

segmentation: ../src/segmentation.cpp ../src/export.cpp
    mkdir -p $(OBJDIR)
    -I $(OPENCV_INSTALL_DIR)/include
    -s EXPORTED_FUNCTIONS="['_on_mouse', '_on_init', '_on_process']"
    --llvm-lto 1
    --closure 1
    -s PRECISE_F32=1
    -s TOTAL_MEMORY=306777216
    -o ./bin/segmentation.js
    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. so i manually set the EMSCRIPTEN_ROOT in /etc/environment and now it recognizes the emcc command in terminal.