Open Mike4Online opened 2 years ago
This is still a problem as pointed out in this issue: https://github.com/aws/aws-sdk-cpp/issues/2963
A short term work around would be to manually copy over the pdb files. A long term solution would be to make sure they get copied over in cmake as @nanocom suggests in the duplicate issue:
if (MSVC)
install(FILES $<TARGET_PDB_FILE:MyExecutable> DESTINATION bin OPTIONAL)
endif()
We are still working on improving the build process, https://github.com/aws/aws-sdk-cpp/issues/1888. I'm not sure when this will get fixed
Describe the bug
When building AWS SDK for C++ version 1.9.267, for Windows, as static libraries, some of the Debug|x64 builds fail to generate a .pdb file along with the .lib file.
Expected Behavior
All .vcxproj files generated by CMake should specify:
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
within Debug build configurations (also in RelWithDebugInfo build configurations).
.pdb files should be generated by default for all Debug builds on Windows.
Current Behavior
After running the following two commands from the CMake build directory I created...
cmake ..\aws-sdk-cpp -DCMAKE_BUILD_TYPE="Debug" -DBUILD_ONLY="s3" -DBUILD_SHARED_LIBS="OFF" -DFORCE_SHARED_CRT="OFF" -DENABLE_TESTING="OFF"
"C:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" ALL_BUILD.vcxproj -target:Rebuild -property:Configuration=Debug;Platform=x64 -maxCpuCount:7
...I can then find a .pdb file IN ONLY THE LAST of the following three output folders:
Upon examining the .vcxproj files generated by CMake, only the one for
aws-crt-cpp
specifies:<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
..within the
ItemDefinitionGroup
forDebug|x64
. The other two .vcxproj files instead specify:<DebugInformationFormat>OldStyle</DebugInformationFormat>
and therefore fail to generate a .pdb file.
Reproduction Steps
See "Current Behavior", reported above, for reproduction steps.
Possible Solution
..alter the CMake files for each AWS SDK project, so when a VC++ project is generated by CMake, the
ItemDefinitionGroup
for eachDebug|x64
build in each AWS SDK project will specify:<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
rather than:
<DebugInformationFormat>OldStyle</DebugInformationFormat>
The same should be done for
Debug|Win32
build configurations, as well as allRelWithDebugInfo
build configurations.Since the CMake files which back the
aws-crt-cpp
project are already doing this properly, they can be used as a model in this regard for other CMake projects within the AWS SDK for C++.Additional Information/Context
No response
AWS CPP SDK version used
1.9.267
Compiler and Version used
Visual Studio 2022 build 17.2.2 - MSVC 19.29.30143.0
Operating System and version
Windows 10 version 21H2 build 19044.1706