Thanks for the detailed demo of using emscripten. It's quite hard to find such detailed examples. I just wanted to note that I did succeeded in macos environment, with few glitches not introduced in the video (such as some autoconfig-archive package missing, apple-specific locale related source fixes, which are all google-fixable). It might have been even better with a documented blog post to try following along besides the video.
I'm finding this video useful for understanding how to create my own html that runs code complied in Emscripten. I want to include Emscripten that renders some graphics, and I want to interact with it through JavaScript widgets. How can I make it display the graphics?
To display graphics you will need an html Canvas element, that is normally how it is done. To output to the canvas you can use a library like SDL or OpenGL which Emscripten is compatible with - there are many tutorials out there you can find to do that. Or you can just output bytes to an array and then access it from the javascript side. You can interact back and forth from JS to C code via the exported functions like I showed in the video.
Thanks for the video.. Its been useful.. But i am getting this error on mac : /bin/sh: -c: line 1: syntax error: unexpected end of file 1. make: *** [xlstool.html] Error 2 2. and another error is :error: implicit declaration of function 'somefunction' is invalid in C99 [-Werror,-Wimplicit-function-declaration] somefunction(0, 1); ^ 3. error: use of undeclared identifier 'FUNC_EXIT' FUNC_EXIT; Can you please make video on how to fix these kind of errors
Jumping from something like web development (which is basically the easiest level) to something like C/C++ (which is one of the most complex levels) is a pretty huge leap. People would need to have some sort of background in real lower level programming as opposed to just scripting in a web browser to really get going with web assembly and C++.
As a complete outsider to C and emscripten i found this extremely helpful starting point.
28:03 small correction. The thing on the right is the "prerequisite." Great content!
Thanks!
@@juat6227 usually yes
Such a nice webassembly speedrun. Thank you for documenting all this info.
Thanks for the detailed demo of using emscripten. It's quite hard to find such detailed examples.
I just wanted to note that I did succeeded in macos environment, with few glitches not introduced in the video (such as some autoconfig-archive package missing, apple-specific locale related source fixes, which are all google-fixable). It might have been even better with a documented blog post to try following along besides the video.
I was having the exact same issues that you did, this video really helped me, so thanks
I'm finding this video useful for understanding how to create my own html that runs code complied in Emscripten. I want to include Emscripten that renders some graphics, and I want to interact with it through JavaScript widgets. How can I make it display the graphics?
To display graphics you will need an html Canvas element, that is normally how it is done. To output to the canvas you can use a library like SDL or OpenGL which Emscripten is compatible with - there are many tutorials out there you can find to do that. Or you can just output bytes to an array and then access it from the javascript side. You can interact back and forth from JS to C code via the exported functions like I showed in the video.
@@nbarkhina Thank you! I was able to display using a canvas.
this is great, thank you
Thanks for the video.. Its been useful.. But i am getting this error on mac : /bin/sh: -c: line 1: syntax error: unexpected end of file
1. make: *** [xlstool.html] Error 2
2. and another error is :error: implicit declaration of function 'somefunction' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
somefunction(0, 1);
^
3. error: use of undeclared identifier 'FUNC_EXIT'
FUNC_EXIT;
Can you please make video on how to fix these kind of errors
I have not tested on a Mac, you probably need a Linux environment which is what Emscripten was designed to run on
Jumping from something like web development (which is basically the easiest level) to something like C/C++ (which is one of the most complex levels) is a pretty huge leap. People would need to have some sort of background in real lower level programming as opposed to just scripting in a web browser to really get going with web assembly and C++.