Category : emscripten

I want to compile SealPIR library using emscripten to generate a wasm file. When using this command: emcmake cmake . I get this error: CMake Error at CMakeLists.txt:19 (find_package): By not providing "FindSEAL.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "SEAL", but CMake did not find one. ..

Read more

I would like to create a wrapper around a C++ member function, which does some additional tasks before calling the actual member function. I’m working with Emscripten and my example below is using the class_function function. Let’s say I have a class called SomeClass (which I don’t "own", i.e. it’s coming from a third party ..

Read more

I’m trying to build a C++ SDL2 project with emscripten with the script below but I get the undefined symbol error. Here’s the build script: em++ src/* -I include -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]’ –preload-file res -o web/project.html Here’s the error: error: undefined symbol: __invoke_$struct_SDL_Surface*_i32_i32_i32_i32_i32_i32_i32_i32 (referenced by top-level compiled C/C++ code) warning: Link with ..

Read more

Tried to use glTexImage3D with emscripten, it complained with error: use of undeclared identifier ‘glTexImage3D’; did you mean ‘glTexImage3DOES’? I thus tried to use glTexImage3DOES instead. The full line is: glTexImage3DOES(GL_TEXTURE_3D, 0, GL_ALPHA, shape2, shape1, shape0, 0, GL_ALPHA, GL_FLOAT,&tex_data[0]); However, then I get the error error: undefined symbol: glTexImage3DOES (referenced by top-level compiled C/C++ code) ..

Read more

I have two fairly simple C++ class definitions and their interfaces, uuid.{hpp,cpp} and uuid_util.{hpp,cpp}, and I have one more file uuid_bind.cpp with #include <emscripten/bind.h> to bind the C++ classes, function and static function definitions to JavaScript. The two classes are first built as a static library uuid_lib.a, which is then linked against the latter C++ ..

Read more

I have function with such signature : void generate_effect(const std::string& file_name, const std::string& out_dir) { … … } and binding such as: EMSCRIPTEN_BINDINGS(main) { function("generateEffect", &generate_effect); } so in JS i call it in such way: const object = await Module() object.generateEffect("file_name", "out_dir"); This works fine But i need to make something like this: object.generateEffect("file_name", ..

Read more

I am trying to make a project with emscripten and c++ but when I want to create the cmake using: emcmake cmake .. I get an error that says this: configure: cmake .. "-DCMAKE_TOOLCHAIN_FILE=<PROJECT_PATH>emsdkupstreamemscriptencmakeModulesPlatformEmscripten.cmake" "-DCMAKE_CROSSCOMPILING_EMULATOR<PROJECT_PATH>/emsdk/node/14.15.5_64bit/bin/node.exe" -G "MinGW Makefiles" emcmake: error: ‘cmake .. "-DCMAKE_TOOLCHAIN_FILE=<PROJECT_PATH>emsdkupstreamemscriptencmakeModulesPlatformEmscripten.cmake" "-DCMAKE_CROSSCOMPILING_EMULATOR=<PROJECT_PATH>/emsdk/node/14.15.5_64bit/bin/node.exe" -G "MinGW Makefiles"’ failed: [WinError 2] The system cannot find the ..

Read more