WebAssembly示例强制浏览器退出

时间:2018-06-02 15:36:07

标签: c webassembly

我正在使用Emscripten运行一个打印消息的WebAssembly示例。浏览器打开一秒钟,打印消息,然后关闭。这是我的代码:

#include <stdio.h>
int main() {
   printf("Hello, World!");
   return 0;
}

我正在使用emcc -s WASM=1 --emrun -o hello.html hello.c编译代码。当我使用emrun hello.html启动服务器时,浏览器会在打印输出后立即关闭。我尝试了不同的标志,但我找不到任何方法来保持浏览器打开。有什么想法吗?

0 个答案:

没有答案