Skip to main content

Questions tagged [emscripten]

Emscripten is an LLVM-to-JavaScript compiler. It takes LLVM bitcode - which can be generated from C/C++, using llvm-gcc or clang, or any other language that can be converted into LLVM - and compiles that into JavaScript, which can be run on the web (or anywhere else JavaScript can run).

emscripten
0 votes
0 answers
59 views

Is it possible to webassembly a C++ Windows application using emscripten:

I have a complex windows application that uses MFC and some OpenGL. I'd like to use Webassembly https://github.com/emscripten-core/emscripten to use emscripten to convert the c++ application to web. ...
felipe's user avatar
  • 1,226
0 votes
0 answers
31 views

emscripten_request_pointerlock() returns EMSCRIPTEN_RESULT_UNKNOWN_TARGET

I have made an example that calls emscripten_request_pointerlock("screen", false); by mouse click: void mousePressEvent(QMouseEvent *event) override { EMSCRIPTEN_RESULT result = ...
8Observer8's user avatar
  • 1,018
0 votes
0 answers
20 views

emscripten module usage and multiple instance?

emscripten 1.38.31 I compiled C++ to a pure JS file with the following command line: call emcc -fno-exceptions -s ASSERTIONS=1 --closure 1 -s MODULARIZE=1 --memory-init-file 0 -s WASM=0 -g0 -v -s ...
user558185's user avatar
0 votes
1 answer
35 views

Module.requestFullscreen is not a function in Emscripten

When compiling to WebAssembly using Emscripten, Emscripten gives you .wasm file, a .html file and a .js file. The html file, it seems, is set up to give a basic demonstration of the workings of ...
Zebrafish's user avatar
  • 12.8k
0 votes
0 answers
22 views

How can I return a vector of structs in C++ using Emscripten and WebAssembly

I want to return to the javascript a type created in c++, called PlayerAction. PlayerAction have two elements, Player, type int and Action, type int_64 I tried to do it the way below but it doesn't ...
Lucas celestino's user avatar
-1 votes
2 answers
89 views

Webassembly as 32bit and 64bit

webassembly emitted from emscripten is 32bit and it can be 64bit. The target device for emscripten is Browsers. Why will it even depend on 32bit ,64bit architectures , as the browser interacts with ...
Mallakbasheer's user avatar
1 vote
0 answers
54 views

Webassembly WASM is too slow compared with SH shell

I have basic C program (in below) and converting to WASM using emcc to .wasm file. #include <stdio.h> int main() { // Iterate from 1 to 10 for (int i = 1; i <= 10000000; ++i) { ...
aze2201's user avatar
  • 519
1 vote
1 answer
64 views

Cannot use ES6 import of Emscripten-generated JS file in Node environment

I have a web app that uses WebAssembly code to perform resource-intensive calculations. The C++ code is compiled with Emscripten with following flags: --bind -s ALLOW_MEMORY_GROWTH=1 -s MODULARIZE=1 -...
Filip Wiśniewski's user avatar
0 votes
1 answer
47 views

call javascript with await from c++ using Emscripten/embind

a javascript function like this: async function getData(){ //do something and return a string } my_module.set_js_func(getData); my c++ emscripten code like this: //bind c++ function ...
user558185's user avatar
0 votes
0 answers
40 views

OpenCV GaussianBlur produces garbled output WASM

I compiled OpenCV for WebAssembly to apply image smoothing and other transforms to images but GaussianBlur produces a garbled image. C++ code I'm using to blur the image // input image RGBA Mat image(...
Fr3ddyDev's user avatar
  • 474
0 votes
1 answer
246 views

ensure you have llvm-symbolizer in your PATH or set the environment var LLVM_SYMBOLIZER_PATH to point to it - exit code 139

in my case I am trying to build a library (open cascade) using emscripten. I have to use a specific version of Emscripten (3.1.39) so clang version is 13. I am using Ubuntu 22 LOGS: [ 0%] Building ...
B Programmer's user avatar
1 vote
0 answers
135 views

clang frontend command failed with exit code 139

I know this seems an already asked question, but I can't find a solution to the error I am facing. I am trying to build Open-Cascade version V7.5.3 on my ubuntu hyper-v VM, using EMSCRIPTEN. I run ...
B Programmer's user avatar
0 votes
0 answers
70 views

How to "manually" map from WASM to source code with DWARF file

I am using Emscripten to compile C++ source code into WASM modules. I am compiling with several debug settings and am able to get the module to print out the line number in the WASM where the error ...
Josh Majors's user avatar
0 votes
1 answer
148 views

I figured out how to use WASM with nextjs via emscripten, but my solution is really stupid

I wanted to call a C++ function from my next.js component. Using emscripten and the -sENVIRONMENT='web' -sMODULARIZE=1 flags, I compiled the C++ into main.js and main.wasm. I tried running it from a ...
Benjamin Gilbert's user avatar
0 votes
0 answers
107 views

Undefined Symbol - Issue when building a project with EMCC

I am trying to compile with EMCC (EMSCRIPTEN) a c++ project built on top of IfcOpenShell ( a c++ library, here some references Installation Github). it's my first time doing it so I had lots of issues,...
B Programmer's user avatar

15 30 50 per page
1
2 3 4 5
86