-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Branch step095-emscripten doesn't build #3
Comments
Hello! You must not use the Visual Studio generator when building with emscripten. The recommended generator for cross-plateform solution is ninja, because it is very leightweight (really just a ninja.exe to save on your disk). ;) The |
Thanks, will try that out! I did manage to get it compiling with a mongrel combination of msys64 and windows command line, but I found I had to make 2 changes: When running, I did get this JS console error: I'm hoping all this will go away if I use the ninja approach, so thanks for the info! |
You need to use this branch of imgui, for the various reasons I list in the PR to imgui that should one day get fixed. And this edit of |
The RESOURCE_DIR change was due to msys64 compiling and misunderstanding the folder string literal: C:/msys64/home/Grisha/LearnWebGPU-Code/Application.cpp:345:43: error: use of undeclared identifier |
Okey it is a problem of semicolons, you can either add them when defining the
or stringify
|
Yep, Ninja worked perfectly once I used your branch of ImGui. Thank you for the help! |
Using emscripten version 3.1.36, when I check out branch step095-emscripten, I run these commands:
emcmake cmake -B build-web -G "Visual Studio 16 2019"
Which succeeds, but the next command fails:
cmake --build build-web
Error messages are:
imgui_impl_wgpu.cpp
C:\Code\WebGPU\LearnWebGPU-Code\imgui\backends\imgui_impl_wgpu.h(16,10): fatal error C1083: Cannot open include file: 'webgpu/webgpu.
h': No such file or directory [C:\Code\WebGPU\LearnWebGPU-Code\build-web\imgui\imgui.vcxproj]
imgui_impl_glfw.cpp
C:\Code\WebGPU\LearnWebGPU-Code\imgui\backends\imgui_impl_glfw.cpp(72,10): fatal error C1083: Cannot open include file: 'GLFW/glfw3.h
': No such file or directory [C:\Code\WebGPU\LearnWebGPU-Code\build-web\imgui\imgui.vcxproj]
Looks like webgpu.h is missing, and when I add it manually, doesn't know to look in there, so probably the cmake files need to be updated too.
The branch step095 builds and runs fine, so not sure why imgui needed to be built differently. Will continue to get it working. Love the tutorials and documentation!
The text was updated successfully, but these errors were encountered: