[BUG]: undefining _DEBUG breaks build on VS 2022
Open
Nobody has claimed this yet.
compiler issue
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
Problem description
After updating to VS2022 my build was broken, I originally reported it to Microsoft, but turns out it is probably pybind bug.
You are not allowed to undef _DEBUG macro.
https://github.com/pybind/pybind11/search?q=_DEBUG
Reproducible example code
My code was broken in Debug build in VS 2022, I used 2.6, but master seems to have same undef.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the pybind11 code references to _DEBUG and reproduce the Debug-build failure with Visual Studio 2022. Determine which undefinition causes the break and verify that the build succeeds without removing the _DEBUG macro.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100