When using EMCC to compile code, an error is reported:
> emcc hello.c -s WASM=1 -o hello.html
emcc: error: LLVM_ROOT is not defined in /
The reason why I encountered this problem is that I did not execute the activation statement after installing emsdk:
> emsdk activate latest
> source "/root/code/emsdk/emsdk_env.sh"
# After activation, you will be prompted to configure the environment, this step is also very important, otherwise it will be activated for nothing
Also be careful not to forget to activate the other two components:
> emsdk activate binaryen-main-64bit emscripten-main-64bit
> source "/root/code/emsdk/emsdk_env.sh"
After activation, don’t forget to configure environment variables
if you encounter similar problems later, you can first:
- Check whether the module in emsdk is activated or not?
- Check whether the source environment is variable or not?
If you can’t confirm, you can redo the above two steps to see if the problem is still there.
Read More:
- The browser is compatible with IE11 “ReferenceError: ‘Promise’ is not defined” “ReferenceError: ‘Promise’ is not defined”
- [Solved] Uncaught ReferenceError: FileAsyncWriter is not defined
- IDEA appears Module ** must not contain source root **. The root already belongs to module ** This kind of error solution
- [Solved] Parcel Service Error: regeneratorRuntime is not defined
- cloud.callFunction:fail Error:wx is not defined [How to Solve]
- [Solved] Uncaught ReferenceError: is not defined at HTMLAnchorElement.onclick
- errorThrown:ReferenceError: data is not defined [How to Solve]
- <script setup> Error: ‘defineProps‘ is not defined [How to Solve]
- [Solved] Eval Error: Uncaught ReferenceError: False is not defined
- [Solved] Electron Error: ReferenceError: require is not defined
- VUE: Property or method “deleteFun“ is not defined on the instance but referenced during render. [How to Fix]
- How to Solve jQuery error: Uncaught ReferenceError: $ is not defined
- Vue Import Baidu map error: BMap is not defined, eslint BMap reports an error
- R Language Error: variable does not have limits defined by datadist
- [Solved] Vue Error: Failed to mount component: template or render function not defined
- [Solved] Eureka Startup Error: Root name (‘timestamp‘) does not match expected type EurekaApplications
- [Uniapp] Solve the error plus not defined when pushing
- [Solved] vcpkg Error: Error: Could not detect vcpkg-root.
- C++ new types may not be defined in a return type Error?
- Abnormal [System.InvalidOperationException: custom type mapping for ‘xxx’ is not specified or is not a solution