-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
I get exception errors in ms visual studio 2019 before the main function #1197
Comments
Friendly reminder: The error messages contain Markdown formatting characters so they aren't showing up as intended. You can surround them with backticks, in this case two, since the message itself contains backticks:
|
Are you also compiling the flecs.c file? That could explain why you're getting missing symbols. |
I changed both program's Properties->Configuration Properties->General->C language standard to ISO C11 standard from Default (legacy MSVC) and now the test program runs on both release and debug. However i still get the exception error in my main program at line 5279
If you mean if i have the flecs.c file in my project together with the flecs.h file then yes they are together in the same directory |
This line of code causes an exception |
Hm, that typically would mean that the OS API hasn't been initialized yet. Are you by any chance trying to call Flecs functions before creating the world? Can you share the stack trace of that crash? |
This is what the Call Stack window showed me, also thanks in advance for your time |
Closing as there's a duplicate help thread on the discord. |
I have two programs one is for testing the other is the main application. I run both in x64 the main program gets exceptions errors, the test program runs on release, but gives linker errors on debug mode:
I have the flecs::world ecs; as a global variable in a .h and .cpp file
//MainProgram.exe
On release mode:
ecs_stage_t *stage = flecs_stage_from_world(&world); //line 5279 read access violation. world was nullptr
On Debug mode:
result = (char *) ecs_os_malloc(size + 1); //line 57888 Exception thrown at 0x00... in app.exe: 0xC0000005: Access violation executing location 0x00...
//TestProgram.exe
On Debug mode:
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol _ecs_abort referenced in function "public: __cdecl flecs::query_base::query_base(struct ecs_world_t *,struct ecs_query_desc_t *)" (??0query_base@flecs@@qeaa@PEAUecs_world_t@@PEAUecs_query_desc_t@@@z) Flecs_Basic_Testing C:\Users\User\source\repos\Flecs_Basic_Testing\Flecs_Basic_Testing\Systems.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol ecs_assert referenced in function "private: static void __cdecl flecs::::each_invoker<class
public: __cdecl <lambda_1>::operator()(struct flecs::entity,struct syscomp)const '::
2'::<lambda_1>,struct querycomp>::invoke_callback<struct flecs::::each_column,struct flecs::::term_ptr,0>(struct ecs_iter_t *,classpublic: __cdecl <lambda_1>::operator()(struct flecs::entity,struct syscomp)const '::
2'::<lambda_1> const &,unsigned __int64,struct flecs::array<struct flecs::::term_ptr,1,void> &,struct flecs::::term_ptr)" (??$invoke_callback@Ueach_column@@flecs@@Uterm_ptr@23@$0A@@?$each_invoker@V<lambda_1>@?1???R1@QEBA@Uentity@flecs@@Usyscomp@@@z@Uquerycomp@@@@flecs@@CAXPEAUecs_iter_t@@aebv<lambda_1>@?1???R4@QEBA@Uentity@2@Usyscomp@@@z@KAEAU?$array@Uterm_ptr@@flecs@@$00X@2@Uterm_ptr@12@@z) Flecs_Basic_Testing C:\Users\User\source\repos\Flecs_Basic_Testing\Flecs_Basic_Testing\Systems.obj 13-18) Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol FLECS__EEcsPipeline Flecs_Basic_Testing C:\Users\User\source\repos\Flecs_Basic_Testing\Flecs_Basic_Testing\Systems.obj 1
3-18 are all LNK2001 errors
Any help would be appreciated
The text was updated successfully, but these errors were encountered: