emscripten-core / emscripten-core/emscripten
Update html when setting EXPORT_NAME
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Hello,
I would like to set `EXPORT_NAME` in my webassembly project.
I do the following with cmake:
```
target_link_libraries(MyProjectWebAssembly PRIVATE "-s MODULARIZE=1 -s EXPORT_NAME=ModuleForMyProject")
```
When I compile, I get the following error:
```
em++: error: Customizing EXPORT_NAME requires that the HTML be customized to use that name (see https://github.com/emscripten-core/emscripten/issues/10086)
my_library\CMakeFiles\MyProjectWebAssembly.dir\build.make:99: recipe for target 'bin/MyProjectWebAssembly.html' failed
mingw32-make[2]: *** [bin/MyProjectWebAssembly.html] Error 1
```
What do I need to update in my html file?
```
MyProject Webassembly
function f() {
Module['callMain']();
}
setTimeout(f, 1000);
```
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.