Emscripten SDL2_IMAGE_FORMATS ='[“ png”]编译错误OSError:[WinError 193]%1无效的Win32应用程序

时间:2019-04-01 01:07:19

标签: windows powershell sdl emscripten

我通过这个网站的Emscripten附带了SDL2 https://lyceum-allotments.github.io/2016/06/emscripten-and-sdl2-tutorial-part-4-look-owl/

this的Emscripten正式文件 建议将标志与

一起使用
-s SDL2_IMAGE_FORMATS='["bmp","png","xpm"]' 

在Windows 10 64位Emanscripten 1.38.29中

但是,如果我使用标志进行编译

-s SDL2_IMAGE_FORMATS='["png"]'

显示错误

OSError: [WinError 193] %1 is not a valid Win32 application

与github issue

中的问题完全相同

评论建议替换命令

SDL2_IMAGE_FORMATS='["png"]' //with SDL2_IMAGE_FORMATS="[""png""]"

我也测试过

SDL2_IMAGE_FORMATS=["png"]

SDL2_IMAGE_FORMATS=[png]

SDL2_IMAGE_FORMATS=['png']

SDL2_IMAGE_FORMATS="['png']"

SDL2_IMAGE_FORMATS=\"["png"]\"

SDL2_IMAGE_FORMATS=\"[\'png']\"

但是,我仍然有完全相同的编译错误

1 个答案:

答案 0 :(得分:0)

在Windows中,您必须输入SDL2_IMAGE_FORMATS = "[""png""]"