Skip to content

Conversation

slambon
Copy link

@slambon slambon commented Oct 12, 2023

There's currently a warning message when using YAML-CPP as static library in debug mode because the library yaml-cppd.lib is expecting / missing pdb information. By setting the pdb generation folder to the lib folder, the compiler is no longer complaining.

It now looks like this:

.\RootBuildFolder\Release
- yaml-cpp.lib

.\RootBuildFolder\Debug
- yaml-cpp static.pdb
- yaml-cppd.lib

See more about the problem:
https://stackoverflow.com/questions/25843883/how-to-remove-warning-lnk4099-pdb-lib-pdb-was-not-found

There's currently a warning message when using YAML-CPP as static library in debug mode because the library yaml-cppd.lib is expecting / missing pdb information. By setting the pdb generation folder to the lib folder, the compiler is no longer complaining.

It now looks like this:
.\RootBuildFolder\Release
- yaml-cpp.lib
.\RootBuildFolder\Debug
- yaml-cpp static.pdb
- yaml-cppd.lib

See more about the problem:
https://stackoverflow.com/questions/25843883/how-to-remove-warning-lnk4099-pdb-lib-pdb-was-not-found
Copy link
Owner

@jbeder jbeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to test this? For example, how would you make sure the CI flags this if there's a regression?

@@ -47,6 +47,8 @@ else()
set(yaml-cpp-label-postfix "static")
endif()

set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_INSTALL_LIBDIR}/../")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It strikes me as a little weird that you're using a parent directory here. Is there a more direct way to put this file in the right spot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants