79807502

Date: 2025-11-03 02:59:21
Score: 0.5
Natty:
Report link

Since I solved it, let me share how to fix this issue.
At very beginning, I tried to install Boost library through vcpkg(i.e. vcpkg install boost). With this, both configure and build are working. But I got an error when this code↓ run. So I decided to complie boost by myself.

desc.add_options()("memory-lock", po::bool_switch()->default_value(false),"Lock memory pages to prevent swapping");

According to the command line used when compiling Boost manually, I updated my VS2022 settings↓.
1. Configuration Properties → Advanced → Use of MFC → Use MFC in a Static Library
2. Configuration Properties → Advanced → Use Debug Libraries → Yes
3. Configuration Properties → C/C++ → Code Generation → Runtime Library → Multi-threaded Debug DLL

Then no error comes out when building my project.
And I don't recommend using Boost Debug installed by vcpkg...

Reasons:
  • Whitelisted phrase (-2): I solved
  • RegEx Blacklisted phrase (2): But I got an error
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Matt WU