Closed Marwan-imverse closed 1 year ago
Problem solved.
We are using Conan as a dependency manager, and for some reason it was systematically downloading the static binaries for easy_profiler
. By forcing it to use the DLL version, the problem is solved.
We have a project with multiple DLLs, each with its own profiling code. But only the code running in the main application is profiled. I suspect this is because the instance of the profiler is not correctly passed between DLL boundaries.
FYI we are using the Visual Studio 2019 Compiler (version 16) with C++17 extensions enabled.
Here is a very simple example of what we are trying to do (eventually the
BUILD_WITH_EASY_PROFILER
macro will be managed by the build system. This is really just a brute force test).In the DLL shared header:
In the DLL implementation:
In the main exe:
As a result, the test_profile.prof file only contains the exe profiling code, and none of the DLL profiling code.
Are we missing something somewhere? A compilation flag or some other option?
[edited for typos]