The easiest way is to simply place all cpp files into one emcc call: emcc -O3 --bind filename1.cpp filename2.cpp ... -o script.js -s ALLOW_MEMORY_GROWTH=1
The next step from this would be using a build tool like cmake or GNU Make, but that's probably overkill for your use case (unless you have dozens of source file). On Wednesday, 14 July 2021 at 12:21:42 UTC+2 satish...@gmail.com wrote: > Hello Guys, > I have multiple c++ classes in my android project. I successfully > converted these file in .wasm file with the help of emscripten so that i > can use it, one of my java script project . But to get WASM file, I used to > compile one class at a time one by one then after create the webassembly > file through command (emcmdprompt). So i want to generate this Webassembly > file in one go. So please sugget that how i can generate. > > I have more that 10 CPP classes, and the Command which i used to compile > cpp class through "emcmdprompt" terminal one by one is > > *emcc -O3 --bind -c fileName1.cpp* > *emcc -O3 --bind -c fileName2.cpp* > *emcc -O3 --bind -c fileName3.cpp* > *.......* > *......* > > and once the object file created then again i run one more command on > "emcmdprompt" terminal to generate* .wasm* file > > *emcc -O3 --bind fileName1.o fileName2.o > fileName3.o -o script.js -s ALLOW_MEMORY_GROWTH=1* > > so please suggest how i can write all these command in single file and run > in one go, instead of manually running one by one. > > Thanks > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/ec591133-5f1c-4e9c-8249-296a31d62086n%40googlegroups.com.