Thanks for the answer. Yes, you are right, the problem here is the compiler. Today I will try to use Clang compiler with CMake, I hope that will work. It has support within Visual Studio. I'll update about this.
El martes, 21 de junio de 2022 a las 11:38:33 UTC+2, Floh escribió: > This looks to me like the MSVC compiler is used for compilation, not the > Emscripten compiler wrapper (emcc) > > Are you aware of the emcmake wrapper tool, and the cmake toolchain file in > the Emscripten SDK? Those can help with building cmake projects in > Emscripten, however I doubt that those would simply work with the cmake > Visual Studio generator (but maybe it works with the Ninja generator and > Visual Studio's new-ish direct cmake support which, instead of Visual > Studio solution files). > > TL;DR: Visual Studio support might work with some tinkering, but I think > it's not a "supported scenario". > > This might actually be a more sensible combination to get started: > > - use the emcmake wrapper to generate Ninja files > - use VSCode with the CMake Tools extension instead of VStudio ( > https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) > > On Sunday, 19 June 2022 at 19:44:09 UTC+2 [email protected] wrote: > >> All errors in VS come from that __atribute__ label. Is there a way to >> compile a project in Visual Studio CMake project having emscripten as >> dependency? >> >> [image: Screenshot_3.png] >> El domingo, 19 de junio de 2022 a las 11:26:54 UTC+2, Lorenzo Portillo >> escribió: >> >>> Hello. I'm new in WebAssembly. I'm trying to use Visual Studio Community >>> to create a project, but I'm having a hell to configure the IDE to work >>> with emscripten. I created a CMake project, I think that's the best option, >>> but I get many errors in IDE. >>> >>> Any idea of what's the best way to create a C++ project focused to >>> emscripten in VS? >>> >>> [image: Screenshot_2.png] >>> >> -- 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/717dedc3-f696-4847-8876-70ca347f596dn%40googlegroups.com.
