MSVC compile error

Open
#385 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Reproduce the documented b2 build on Windows 10 with Visual Studio 2022, then inspect shell.cpp and the sources corresponding to process_handle_windows.obj, env.obj, and proc_info.obj. Check how the four unresolved symbols are linked and verify that the build completes without the reported LNK errors.

Written by the indexing model from the issue text.

Description

I tried to build boost as in the documentation with b2. However, I get the following error message:

16:44:14 compile-c-c++ build-143-x64\boost\bin.v2\libs\process\build\msvc-14.3\debug\x86_64\threading-multi\shell.obj
16:44:14 shell.cpp
16:44:14 Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:
16:44:14 - add -D_WIN32_WINNT=0x0601 to the compiler command line; or
16:44:14 - add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.
16:44:14 Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
16:44:14 msvc.link.dll build-143-x64\boost\bin.v2\libs\process\build\msvc-14.3\debug\x86_64\threading-multi\boost_process-vc143-mt-gd-x64-1_86.dll
16:44:14 process_handle_windows.obj : error LNK2019: Unresolved external symbol "RtlNtStatusToDosError" in function ""void __cdecl boost::process::v2::detail::suspend_(void *,class boost::system::error_code &)" (?suspend_@detail@v2@process@boost@@YAXPEAXAEAVerror_code@system@4@@Z)".
16:44:14 env.obj : error LNK2001: Unresolved external symbol "RtlNtStatusToDosError".
16:44:14 proc_info.obj : error LNK2001: Unresolved external symbol "RtlNtStatusToDosError".
16:44:14 process_handle_windows.obj : error LNK2019: Unresolved external symbol "NtResumeProcess" in function ""void __cdecl boost::process::v2::detail::resume_(void *,class boost::system::error_code &)" (?resume_@detail@v2@process@boost@@YAXPEAXAEAVerror_code@system@4@@Z)".
16:44:14 process_handle_windows.obj : error LNK2019: Unresolved external symbol "NtSuspendProcess" in function ""void __cdecl boost::process::v2::detail::suspend_(void *,class boost::system::error_code &)" (?suspend_@detail@v2@process@boost@@YAXPEAXAEAVerror_code@system@4@@Z)".
16:44:14 env.obj : error LNK2019: Unresolved external symbol "NtQueryInformationProcess" in function ""struct boost::process::v2::ext::env_view __cdecl boost::process::v2::ext::env(void *,class boost::system::error_code &)" (?env@ext@v2@process@boost@@YA?AUenv_view@1234@PEAXAEAVerror_code@system@4@@Z)".
16:44:14 proc_info.obj : error LNK2001: Unresolved external symbol "NtQueryInformationProcess".
16:44:14 build-143-x64\boost\bin.v2\libs\process\build\msvc-14.3\debug\x86_64\threading-multi\boost_process-vc143-mt-gd-x64-1_86.dll : fatal error LNK1120: 4 unresolved external links
  • Windows 10
  • Visual Studio 2022
  • 2c372461e8ab49fde18bff6c3c5e47b721d70383
Dominant language
C++
Stars
145
Forks
151
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/process

All issues in boostorg/process

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.