'How to Blazor compile multi file c code to wasm
THe blazor docs show a trivial example https://docs.microsoft.com/en-us/aspnet/core/blazor/webassembly-native-dependencies?view=aspnetcore-6.0 where the c code is in one file. I made my own version of that and got it to work, but now I want to compile something that has multiple files, has non trivial source tree structure, makefile etc.
Solution 1:[1]
You have to use Emscripten (version 2.0.23) to compile all dependencies to wasm, and then link them, which is the tool that NET also uses to compile your C source.
Emscripten supports make & cmake so you can change the make files to use emcc instead and rebuild the project.
Im also asking about similar issue but more library specific, perhaps the sources there can provide you with some help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Nofal |