emscripten

How do I tell the Emscripten SDK where to find Node?

喜夏-厌秋 提交于 2019-12-13 09:31:15
问题 Having trouble with the emsdk under Debian Jessie on an ODROID SBC. When I enter "emsdk list", it shows node is indeed installed: node-4.1.1-32bit node-4.1.1-64bit * node-8.9.1-32bit INSTALLED node-8.9.1-64bit Yet when I enter emcc -v to check for warnings, I get: INFO:root:Checking JS engine ['/home/jackalope/emsdk/node/8.9.1_32bit/bin/node'] failed. Check your config file. Details: [Errno 8] Exec format error WARNING:root:cannot check node version: [Errno 8] Exec format error INFO:root:

Getting NetBeans' C++ parser to work with Emscripten

人盡茶涼 提交于 2019-12-13 04:20:20
问题 I'm having a little problem with NetBeans' C++ parser. Everything seems to work fine except for when I do std::vector or std::cout etc. in my code. If I leave off the std:: part the parser works fine but when I have it in it gives "Unable to resolve identifier vector." (or cout in the other example). Anyone know why it's doing this? Additional Info: I'm using Netbean 8. I have the following settings in Tools > Options > C/C++ > Build Tools : Build Host: Localhost Family: CLang Encoding: UTF-8

Alternative to v8 for exposing C++ objects to JavaScript (on PowerPC)

怎甘沉沦 提交于 2019-12-13 03:58:53
问题 I need to expose C++ classes (packed as shared libraries) to the magic world of JavaScript. The most obvious solution is to use Node.js/v8. Problem is that it has to run on PowerPC (please no comments on this...) and - alas! - v8 doesn't run on PowerPC (the v8-powerpc project seems to be dead). I'm trying to understand if there's any other viable solution, at the moment some possibilities are: emscripten, which converts LLVM bitcode into JavaScript; WebKit's JavaScriptCore, although I'm not

Emscripten can't find path to cmake

点点圈 提交于 2019-12-12 20:32:25
问题 I've gone over the instructions several times, looked in countless forums, and still can't resolve this issue. I'm running Windows 10, and simply trying to install Emscripten. I've got Emscripten installed: I run # Fetch the latest registry of available tools. emsdk update followed by # Download and install the latest SDK tools. emsdk install latest But it continues to throw the same warning about being unable to find the path to cmake. I've downloaded and installed cmake-3.3.2-win32-x86 . I

How to use FS when MODULARIZE and EXPORT_NAME are used in emscripten

非 Y 不嫁゛ 提交于 2019-12-12 12:19:01
问题 I have an application that contains libraries generated with emscripten. I am compiling them using the flags: -s MODULARIZE=1 -s EXPORT_NAME=\"'SomeModuleName'\" However, the library FS is no longer available. When I was compiling without the flags, I could use the library FS in any other script. Is it possible to export FS in my module? 回答1: The FS module is not exported by default when using the flag -s EXPORT_NAME="'SomeModuleName'" If you want to export the module FS, you have to add the

Error converting c++ file to wasm using emscripten

不问归期 提交于 2019-12-12 07:00:02
问题 This is a follow up question from this post Converting .cpp file to .wasm file I'm trying to convert my c++ file into .wasm using emscripten on linux. I'm running into this error: /home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:188:10: error: use of undeclared identifier '__builtin_ia32_readeflags_u32' return __builtin_ia32_readeflags_u32(); ^ /home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:194:3: error: use of undeclared identifier '__builtin_ia32

emscripten issue with ubuntu version “aborting from js compiler due to exception: unknown vector type <4 x i8> | undefined”

匆匆过客 提交于 2019-12-12 02:09:25
问题 I cannot compile anything with the current version of emscripten from the ubuntu repos Here is the error http://pastebin.com/j5Z0ztTs I suspect it might be because emscripten is outdated in the repos, but why is there no bug reports?? Could anyone help? I cannot find any updated information. Thanks in advance. 回答1: The reason is because you are using the /usr/bin/clang++ that comes with your Linux distribution. This version does not support Javascript backend. In order to use emscripten, you

Emscripten error when compiling double comparison function 'IsAlmostEqual'

萝らか妹 提交于 2019-12-11 19:09:28
问题 I'm novice in using emscripten and encountered an error in compiling cpp file. I have iae.cpp: bool IsAlmostEqual(double A, double B) { //http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm long long aInt = reinterpret_cast<long long&>(A); if (aInt < 0) aInt = -9223372036854775808LL - aInt; long long bInt = reinterpret_cast<long long&>(B); if (bInt < 0) bInt = -9223372036854775808LL - bInt; return (std::abs(aInt - bInt) <= 10000); } I tried to compile it using emscripten

How do I access the Emscripten typed array from javascript?

孤街醉人 提交于 2019-12-11 03:32:23
问题 I had compiled a C lib into javascript code by using Emscripten. However I ran into a problem when I try to bind it with my Javascript wrapper. I wrote this to pass it by reference, I am able to access it via the compiled lib just fine. var str_to_heapu8 = function (str) { return allocate(intArrayFromString(str), 'i8', ALLOC_NORMAL); } However, I have trouble retrieving it back to normal javascript string... the return value is an empty string. var heapu8_to_str = function (ptr, len){ var