I have a VisualStudio-2019 C++ Project which uses CMake and Ninja to build a dll, the Project uses functions from a few Libraries like
spdlog, which I have installed using
When building, the output gets written to four distinct dll files and all of them are needed for the
main-dll to run.
Below are two screenshots: left the current state and right the expected state.
main.dll file should include all the functions it imports, the compiler shouldn’t create separate dlls for each library.
I don’t know knob I need to turn, I can imagine several ways to edit:
- The C++ Code of the Project (Classes, inlining functions ?)
- The CMakeList.txt
- The Arguments of MSVC (compiler, linker flags)
- The Arguments of Ninja
Where should I start ?
Source: Windows Questions C++