Skip to content

MacOS - ctor/dtor counting test doesn't work #2

@onqtam

Description

@onqtam

For some reason this test (which exports a function called test_ctor_dtor_order() and calls it from RCRL-submitted code) for the order of construction and destruction of variables from a vars section doesn't work on MacOS - this is the output of a failing build - it is as if the function was never called! The weird thing is that it doesn't crash or assert or anything like that - the compiled plugin is copied and loaded successfully...

and the MORE weird thing is that I have no problems calling such exported functions in the demo application (the host_app target) that is the focus of the repository itself

and the EVEN MORE weird thing is that before doing this test with exported symbols I was just inspecting the stdout output when loading the plugin and when unloading it (this commit is with the changes from text-based testing to an exported function) and it... didn't work on MacOS (but output redirecting works perfectly fine for the host_app target)

I tried not to reuse the same plugin.cpp filename for the plugin for the host_app target and the rcrl_compiler_tests target but that didn't help. Maybe the host_app target just works because of some CMake flags inherited from one of the third parties it links against (perhaps glfw?).

So I'm giving up - I cannot waste any more hours on that platform - hopefully someone else helps me.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions