I want to build one dynamic lib with ROOT dependencies in VS2022. However it’s failed. If I used the same code to build EXE file, it’s ok.
The output is following:
The first message I see is the C++ standard not being the same than the one ROOT was build for (c++17). Make sure you are also using the /Zc:__cplusplus compiler flag. And generally speaking, I would advise to use CMake to generate your solution to ensure the flags are correct. And it also allows to properly export the symbols from the DLL