Questions tagged [emcc]
43 questions
0
votes
1 answer
undefined symbol: llvm_gcda_emit_arcs error when running "emcc -fprofile-arcs -ftest-coverage"
Run command:
emcc -fprofile-arcs -ftest-coverage demo.cpp
Error response:
error: undefined symbol: llvm_gcda_emit_arcs (referenced by top-level compiled C/C++ code)
warning: Link with `-sLLD_REPORT_UNDEFINED` to get more information on undefined…
0
votes
1 answer
What are the numbered functions in .wat files compiles with emcc?
I am compiling my Rust code which has a linked in C++ static library to wasm32-unknown-emcc. Out of curiosity, I converted the generated wasm file to a .wat file for better readability and saw this at the top. I understand the last line, as I can…
user8352734
0
votes
0 answers
'gsl/gsl' file not found, emscripten. HOw to include the ms-gsl library to be compiled when creating WASM from C++
I'm compiling some C++ with emscripten and I'm having a problem to use some features from gsl such as "Expects". The emcc can't find "gsl/gsl".
How can I compile it with gsl?
Here is the header file:
#ifndef ROBOT_CPP_PWMTEST_H
#define…

Thiago Souto
- 21
- 4
0
votes
0 answers
Call C++ Emscripten binded function with SDL2 in it from JS
I am struggling with running compiled c++ code. I want to call it from JS. The c++ code is below:
#include
#include
#include
#include
#include
#include
SDL_Window *…

moraprex
- 103
- 9
0
votes
0 answers
How can I ensure one of my variables dosen't get minified when compiling in emcc?
So...I am modifying sql.js. In this project I am trying to export a function / object I created and somehow the name gets minified when I compile with emcc
The Database that sql.js exports does not get minified. How might I be able to modify this…

ovatsug25
- 7,786
- 7
- 34
- 48
0
votes
1 answer
How to run in wee8 wasm code that was compiled from c++ with emcc? (WASI in wee8?)
I am trying to compile C++ code to wasm and then embed it in other C++ code with wee8 (v8's wasm-api). Currently I'm getting a Segfault on instantiating the module:
auto instance = wasm::Instance::make(store, module.get(), imports);
Note that I…

talz
- 1,004
- 9
- 22
0
votes
1 answer
Emscripten compilation error: "'openssl/sha.h' file not found"
I have a file called "speed.c" which I wish to use for a web program
This works:
gcc speed.c -lcrypto -lssl
But this doesn't:
emcc speed.c -v -lcrypto -lssl -s EXPORTED_FUNCTIONS=_speed,_main -o speed.wasm
The function within speed.c is called…

Gabe Koleszar
- 45
- 5
0
votes
1 answer
Emscripten: fatal error: 'tr1/unordered_map' file not found
So I am trying to compile the following code using emscripten:
// this is test.cpp
#include
#include
#include
#include //needed to use unordered maps in C++. not needed C++11 onwards
#include…

Varghese George
- 5
- 1
- 4
0
votes
0 answers
Link errors with Boost port of header-only libraries for Emscripten in C++ / Wasm
I'm trying to compile a cpp file to make some tests with the Boost library in a Wasm project by using the existing Emscripten port:
https://github.com/emscripten-ports/boost
When I use some of the Boost modules it works properly, like lambda in this…

Dani P.
- 1,073
- 1
- 10
- 28
0
votes
0 answers
Cannot find emcc - emscripten
I'm trying to execute a .bat and i get:
Building demos/touchscreen...
Cannot find emcc
Emscripten is not installed (or not in your PATH)
I found the "emcc" file and it is located here: C:\emsdk\emscripten\1.38.23
So I checked the system…
0
votes
1 answer
The std::filesystem current_path returns the root one
I just wanna to print the current path and its content, via std::filesystem::path::current_path (the compiler is emcc this one). Some code below:
//... some stuff ...
namespace fs =
#if defined(_MSC_VER) || defined(_WIN32)
…

JuiceFV
- 171
- 11
0
votes
1 answer
Errors while ffmpeg compiling with emcc : static declaration of 'cbrt' follows non-static declaration
I trying to use emscripten compile ffmpeg through the following script, but I got errors while compiling: (Using Mac pro - Docker ubuntu FFmpeg:4.3.1 and emcc:2.0.1)
make: make
CC libavdevice/alldevices.o
In file included from…

lin q
- 1
0
votes
1 answer
Compile WASM which depends on QTCore libraries
I have a MS Visual Studio 2015 project, where I created a class Test:
#include
#include
class Test
{
public:
Test(){QString str = "Hello";
std::cout << str.size();};
~Test();
…

Ronak SHAH
- 171
- 2
- 11