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).

Links to demos, tutorial, FAQ, etc: https://github.com/kripken/emscripten/wiki

Main project page: http://emscripten.org

1241 questions
-1
votes
1 answer

Passing strings to .wasm module

I've been stuck on this for a while now and I cannot seem to find good resources to my problem. I am coming from and "only C" background, so most of the web dev stuff is completely new for me. I wrote a C function float editDistance(char *str1, char…
davidanderle
  • 638
  • 6
  • 12
-1
votes
1 answer

How to make cmake identify correct version in centos 6 terminal?

After a very long and lengthy process of trying to get Emscripten going. I'm stuck trying to build fastcomp. cmake .. -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;JSBackend" -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF…
user9220830
-1
votes
1 answer

How to read elements of a C++ array inside EM_ASM

This code is wrong but it tells what I am trying to do float a[2] = {1.0f, 2.0f}; EM_ASM({ var sum = $0[0] + $0[1]; }, a); What would be the correct way?
porente
  • 371
  • 2
  • 14
-1
votes
1 answer

emscripten document.createElement in C

Inside my C code that will be compiled by Emscripten How do I create an HTML element? There is this emscripten function emscripten_request_pointerlock that requires a Target HTML element id How can I get this id after creating an HTML element?
porente
  • 371
  • 2
  • 14
-1
votes
1 answer

Error trying to compile C++, OpenGL and Emscripten on Visual Studio 2010

I'm trying to configure Emscripten and OpenGL on Visual Studio 2010. Emscripten and OpenGL are working fine separated. When I'm trying to compile an OpenGL example with Emscripten I get linker error - GCCLINK : error root: opengl32.lib: No such…
yairbr
  • 69
  • 1
  • 5
-2
votes
1 answer

Problems with callbacks using emscripten with pthreads

emscripten_set_click_callback does not work with multithreading. I'm not sure why, but certain functions like emscripten_set_click_callback and other similar input functions don't work with pthreads enabled, it gives an error saying it cannot target…
Ross Evan
  • 1
  • 2
-2
votes
1 answer

Emscripten_set_main_loop not working -- usleep undefined?

My project is compiling and opening up on the web but the main loop is not working. The error seems to be that usleep is undefined. I'm not sure how I can correct this. As per the error message, I seem to be dividing by zero (undefined). I tried…
Adib0y360
  • 1
  • 5
-2
votes
1 answer

javascript in C++

Is it possible somehow to use javascript code inside C++? For example I have some js library and want to use some it's methods in my C++ project (I know about emscripten but it looks like I have to build C++ code with emcc).
lfk
  • 57
  • 7
-2
votes
1 answer

Why is LLC.exe missing in LLVM windows?

I've been trying to use emscripten to build C into WASM and Javascript. Emscripten requires clang so I installed it but then it says "emcc: error: llc executable not found at C:\Program Files\LLVM\bin\llc.exe" when running emcc and em++. Is there a…
1 2 3
82
83