【问题标题】:Cannot find preloaded image (emscripten)找不到预加载的图像 (emscripten)
【发布时间】:2015-11-26 14:27:51
【问题描述】:

我尝试使用 emscripten 将 SDL 项目编译为 HTML5/JS。

文件位于data 目录中。我使用以下代码预加载目录:

--preload-file data@

但是如果我运行编译后的代码,我会得到这个错误:

Cannot find preloaded image /res/img.PNG

res 目录位于 data 目录中。目录和文件已加载。我用dirent检查过了

【问题讨论】:

    标签: javascript c++ html sdl emscripten


    【解决方案1】:

    SDL_image 需要--use-preload-plugins-s STB_IMAGE=1 等。

    Compiling and Running Projects » Building Projects » Emscripten Ports

    【讨论】:

      猜你喜欢
      • 2020-12-31
      • 1970-01-01
      • 2014-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多