does this make sense? Is there any better interop between wasm and js available?
---
I've been testing the wasm build on windows 10 with latest emscripten toolchain (3.1.23).
I get this output:
C:\webp\libwebp\webp_js>emmake make
make: C:\emsdk\mingw\4.6.2_32bit\mingw32-make.exe
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
TIFF is disabled when statically linking.
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Disabling SSE41 optimization.
-- Disabling SSE41 optimization.
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Success
-- Disabling SSE2 optimization.
-- Disabling SSE2 optimization.
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Success
-- Configuring done
-- Generating done
-- Build files have been written to: [...]
Consolidate compiler generated dependencies of target webpencode
[ 15%] Built target webpencode
Consolidate compiler generated dependencies of target sharpyuv
[ 19%] Built target sharpyuv
Consolidate compiler generated dependencies of target webputilsdecode
[ 25%] Built target webputilsdecode
Consolidate compiler generated dependencies of target webpdecode
[ 31%] Built target webpdecode
Consolidate compiler generated dependencies of target webpdspdecode
[ 52%] Built target webpdspdecode
[ 53%] Built target webpdecoder
Consolidate compiler generated dependencies of target webpdsp
[ 83%] Built target webpdsp
Consolidate compiler generated dependencies of target webputils
[ 91%] Built target webputils
[ 92%] Built target webp
Consolidate compiler generated dependencies of target webpdemux
[ 94%] Built target webpdemux
[ 95%] Building C object CMakeFiles/webp_wasm.dir/extras/webp_to_sdl.c.o
[ 96%] Linking C executable webp_wasm.js
emcc: error: undefined exported symbol: "[_WebpToSDL]" [-Wundefined] [-Werror]
mingw32-make[2]: *** [webp_wasm.js] Error 1
mingw32-make[1]: *** [CMakeFiles/webp_wasm.dir/all] Error 2
mingw32-make: *** [all] Error 2
emmake: error: 'C:\emsdk\mingw\4.6.2_32bit\mingw32-make.exe' failed (returned 2)
I cannot explain why emcc does not find the export.
Is sdl required for this to work?