SanderMertens / flecs

A fast entity component system (ECS) for C & C++
https://www.flecs.dev
Other
6.47k stars 454 forks source link

flecs compiled in windows debug mode crashes on world init #1031

Closed xubury closed 1 year ago

xubury commented 1 year ago

With this simple example compile in debug mode, the program crashes on init.

#include <flecs.h>

int main (int argc, char *argv[]) {
    flecs::world world;
    return 0;
}

fatal: entity.c: 1893: flecs.meta.MetaTypeSerialized (INVALID_COMPONENT_SIZE)

However, it runs without errors if I compile in release mode or use the C API. Any ideas? I compling v3.2.5 with c++11 using vs2019 on windows10.

SanderMertens commented 1 year ago

This happens when the application & flecs library mismatch in debug/release mode. It sounds like you're linking against a release mode flecs library with a debug mode application.

SanderMertens commented 1 year ago

Closing this issue as it has been answered. If the problem persists, let me know!