microsoft / microsoft/Detours

Compiling Detours

Open
#334 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
C++
Stars
6.4k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

I don't want to use VCPKG as I find it difficult to understand. NuGet Manager was simple.

So I used GitHub Desktop to clone the repository to my pc. Then I opened the solution file in Visual Studio 2022.

But it says:

D:\My Libraries\Detours\vc\Detours.vcxproj : warning : The build tools for Visual Studio 2019 (v142) cannot be found. Install Visual Studio 2019 (v142) to build using the Visual Studio 2019 (v142) build tools.

I don't want to install the 2019 build tools. Can I configure it for 2022 build tools?

So I closed the SLN file and opened the VCXPROJ file instead and tried to cmpile debug x86:

>Done building project "Detours.vcxproj" -- FAILED.
1>
1>Build FAILED.
1>
1>error CS1668 : Warning as error : Invalid search path 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.29.30133\atlmfc\lib\x86' specified in 'LIB environment variable' -- 'The system cannot find the path specified. '
1>NMAKE : fatal error U1077: 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\csc.EXE' : return code '0x1'
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\nmake.exe"' : return code '0x2'
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\nmake.exe"' : return code '0x2'
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command "SET DETOURS_TARGET_PROCESSOR=x86
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: cd ..
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: nmake" exited with code 2.

Either way, I can't compile the x86 or x64 library files. Please advise.

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.

Research direction

Start with vc/Detours.vcxproj and the solution in Visual Studio 2022, then reproduce the x86 and x64 builds described in the report. Investigate the v142 toolset and missing atlmfc/lib/x86 path errors; done means the library builds successfully with the available Visual Studio 2022 tools.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.