microsoft / microsoft/Detours

Samples Issue with detours.h under Visual Studio

Open
#329 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
In the Visual Studio IDE, references to detours.h in all of the samples source code files report an error of "cannot open source file "detours.h", even after building the src folder.

I realize that the detours package is primarily directed to developers who mainly use the command line instead of the IDE. But the project includes a Detours.sln file for opening the project in the Visual Studio IDE. Shouldn't that file address this very basic problem? I would like to be able build this project in the Visual Studio IDE. If that is not possible, or not supported, should the Detours.sln file even be included in the project?

I am not an advanced c language developer, so I apologize if there is something simple here that I am missing.

Command-line test case
This is a pre-build issue with detours.h for all of the samples source code in the in the Visual Studio IDE, not a command line problem. To illustrate this problem, merely open the vc\Detours.sln file in the Visual Studio IDE (with as-installed default settings), then open any of the source code files in the samples folder that make use of detours.h.

Expected behavior
With the Detours solution opened in the Visual Studio IDE, settings should be changed as necessary to correct the problem described above. Then the solution should be saved and the corrected Detours.sln file should be uploaded to the vc folder on github.

Detours version
Version 4.0.1 of Detours as downloaded via gitclone on 11/21/2024.

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

Open vc\Detours.sln in Visual Studio and inspect its project include settings while viewing the samples source files that reference detours.h. Verify the default solution reports no missing-header errors for those files and that the corrected solution can build the samples, then save the solution changes in the vc folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.