-
-
Notifications
You must be signed in to change notification settings - Fork 441
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
Fatal errors when trying to integrate into Emscripten project #1042
Comments
Hm, that sounds like an uninitialized value somewhere, I'll try to reproduce it |
Try adding |
Closing this issue as this fix seems to work for multiple people. Feel free to comment here if the issue wasn't resolved! |
Hi, I recently started an Emscripten/WebGL C++ project, but I'm having difficulties integrating Flecs. I'm not quite sure where to ask for help for this, but I figured I'd give it a shot here first.
Describe the bug
If I try to add some basic Flecs code to my C++ project, then when I build and run it I get the following error output:
To Reproduce
Not quite sure...
Expected behavior
Seeing
[ECS test]: Bob lives!
in the logger.Additional context
System info:
em++ --version:
In the C++ code, all the Flecs code is the following:
And if I comment these Flecs parts out of the code above, then the application runs as intended (sans any Flecs, of course).
main.cpp
has the following:The App instance gets constructed before the Emscripten main-loop (since it's responsible for most initialization and such), but this shouldn't be an issue for Flecs, should it?
Some possibly relevant parts of the
CMakeLists.txt
:And some possibly relevant parts of the
index.html
:Do I need to do something particular with moduleArgs or something?
Thanks in advance for any help!
I really hope that I can get this working, Flecs seems absolutely amazing. ❤️
edit:
When I build the project as a binary without Emscripten, I get the expected output:
The text was updated successfully, but these errors were encountered: