问题
When a C program is compiled with Emscripten, there is an HTML page generated that will display the results of the program. I was wondering how you could pass command line arguments to the application. For instance, with the original C program it's ./bfs 32 1
.
回答1:
I was able to pass command line arguments by adding a line to the generated .html file. Not sure if this is the correct solution but it worked.
There's a var Module
declared. simply add the following line underneath: arguments: ['32', '1'],
来源:https://stackoverflow.com/questions/23407296/passing-command-line-arguments-to-an-emscripten-generated-application