Web/emscripten compiling Help

Hello lovely community =D

I am trying to compile the "core_basic_window_web" example, but I am not really understanding how does it work nor what I am supposed to do at all.

I would really apreciate someone to explain me a little about all this (web/emscripten compiling).

I have successfully installed the emscripten sdk (placed it in the right path) and uncommented the #define. Also tried to modify the "makefile" unsuccsesfully.

As far as I understand, my problem comes from the "makefile", but I am having several doubts about all this in general, even if the only problem were in the makefile.

Thanks for the help.

Me. :P


The error on trying to compile using "raylib_compile_emscripten"CreateProcess() failed with error code 2:
El sistema no puede encontrar el archivo especificado.

The error on trying to compile using "raylib_makefile_emscripten" emcc -o core_basic_window.html core_basic_window.c -O1 -Wall -std=c99 -s USE_GLFW=3 -s ASSERTIONS=1 --preload-file resources -I. -I../src -I../external/glfw3/include -I../external/glew/include -I../external/openal_soft/include -L. -L../src -L../external/glfw3/lib/ -L../external/openal_soft/lib/ -L../external/glew/lib/ ../src/libraylib.bc -DPLATFORM_WEB
makefile:207: recipe for target 'core_basic_window' failed
process_begin: CreateProcess(NULL, emcc -o core_basic_window.html core_basic_window.c -O1 -Wall -std=c99 -s USE_GLFW=3 -s ASSERTIONS=1 --preload-file resources -I. -I../src -I../external/glfw3/include -I../external/glew/include -I../external/openal_soft/include -L. -L../src -L../external/glfw3/lib/ -L../external/openal_soft/lib/ -L../external/glew/lib/ ../src/libraylib.bc -DPLATFORM_WEB, ...) failed.
make (e=2): El sistema no puede encontrar el archivo especificado.
mingw32-make: *** [core_basic_window] Error 2


As I said, I am having several doubts with all this.
Thanks again.

Comments

  • Great! Thanks for the help. It's working!!!

    Sorry for not taking a look at wiki in first instance... :sweat:

  • Hello again.
    I am having problems on loading a texture. I have no problems on compiling, but when I open the browser, I get 3 warnings:

    WARNING: [EXTENSION] NPOT textures extension not found, NPOT textures not supported
    WARNING: [resources/asd.jpg] Image could not be loaded, file not recognized
    WARNING: Texture could not be created

    The texture is 32x32 so the first one shouldn't be a problem, although I would like to solve it anyway.

    I saw on wiki that I should use: --precompiled-file folder but on the compiling script there is this piece of code: --preload-file resources. --precompiled-file resources Is just not working for me, and I didnt find any info about this parameter. So I supposed the right way was just to use the default script.

    I hope you can help me, I suppose it is a quite simple problem, so, here I am, waiting for some help D:

    Thanks you again.


  • First thing, you should use PNG images.

    Second, place images in your resources/ folder and use on compiling script: --preload-file resources. It was wrong in the wiki, I already corrected it.
  • Okey, the last hello for today, so, Hello.
    Yes, I was already using the right parameter, my problem was caused for my localhost "config" just a stupid fail nvm.

    Thanks for all the help provided. Everything working perfectly!.
  • Glad to hear that! :D
Sign In or Register to comment.