Packing Debug and Release for MultiConfig generators
https://cmake.org/cmake/help/latest/guide/tutorial/Packaging%20Debug%20and%20Release.html
Note: This example is valid for single-configuration generators and will not work for multi-configuration generators (e.g. Visual Studio).
This make me confuse. I follow the instructions in previous 11 steps on Windows with VS2022, all OK, and now it seems I cannot packing Debug and Release ?
I wish there is a Step13 for MultiConfig generators, for packing both Debug and Release libraries, because if we use Debug and Release libraries (C++ libraries, just like the MathFunctions
and SqrtLibrary
in the tutorial) on MSVC compiler, it will complain
error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
And this LNK2038
error is very common for MSVC compilers, but using both Debug and Release libraries, for GCC/Clang compilers, is not that often.