Wow, that looks overly complicated (I guess that's Bazel's fault). If you are on a Mac, the easiest way to get a working emscripten environment is via homebrew:
> brew install emscripten On Linux, check whether the emscripten SDK is provided by your distro's package manager, otherwise (or if on Windows), follow the steps described here to install the emscripten SDK: https://emscripten.org/docs/getting_started/downloads.html ...and to test whether this worked, write a small hello.c: #include <stdio.h> int main() { printf("Hello World!\n"); return 0; } ...then run: > emcc hello.c -o hello.html ... ..this should produce 3 files: hello.html, hello.js and hello.wasm ...to test whether the produced application works: > emrun hello.html Starting browser: open http://localhost:6931/hello.html ... ...this should open the system's default browser and show the emscripten standard demo page, at the bottom of the page there should be a "Hello World!" message in a text output field. >From there, move to more complex stuff. But I would move to build systems only when you're sure that the emscripten installation itself works. Build systems just add more things that can go wrong, and the additional "obfuscation layer" (which the build systems add on top of the compiler toolchain) can make it harder to find the actual problems. Cheers, -Floh. On Monday, 20 May 2019 11:01:32 UTC+2, Tsvi Sabo wrote: > > Following this tutorial: > https://docs.bazel.build/versions/master/tutorial/cc-toolchain-config.html > And after fixing some of the configuration's paths, > i manage to build a really simple `hello-world` `c` file, but when i > follow the example completely, and include some cpp headers such as > <ctime>, i get the following: > > "In file included from /home/tsvi/IOTA_DEV/entangled/hello-world.cc:2: > In file included from > external/emscripten_toolchain/system/include/libcxx/iostream:38: > In file included from > external/emscripten_toolchain/system/include/libcxx/ios:216: > external/emscripten_toolchain/system/include/libcxx/__locale:417:32: > error: use of undeclared identifier '_CTYPE_S' > static const mask space = _CTYPE_S;" > > > So, i am guessing, it might be using wrong include paths of clang after > all? > How do i fix this? > Thanks > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/9cff3f50-bee1-43ac-be9b-f7076024d47e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
