Build c++ project with emscripten using cmake to webassembly without js and wasm file output


This Content is from Stack Overflow. Question asked by Dong

I have written a c++ sample with little codes like “hello world”, and successfully build it to webassembly.
But when I switch to my actural c++ project it doesn’t work correctly.
My c++ solution contains 2 project, one is a static library and other is a exectutable linking the first one.
Following is my command:
emmake cmake -DCMAKE_BUILD_TYPE=Release ..
emmake cmake --build . --config Release
My default complier is Visual Studio 2022.
And I got a lib and a exe file, but without the excepted js and wasm files.
What should I do to solve this problem?


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?