Can vs2022 do the same include path search just like vs code?

兰树豪 381 Reputation points
2023-06-03T23:09:51.04+00:00

First, I have a project Folder structure just like picture below(why there 2 same folder name?I don‘t know )

User's image

Then,in the vs code,set include path ,and use it see below picture

User's image

Now,I want use this project in visual studio 2022, there is a problem,I have to add two folder name,otherwise VS2022 can't find the header file

User's image

User's image

User's image

PLEASE ,someone can help me,is there any way can make it use same path as vscode to find the head file ?

yes can change code for vs2022 ,add a folder name,but there is too many code need to change。

so please help me,thanks!!!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,853 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,625 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 114.4K Reputation points
    2023-06-04T02:19:11.5666667+00:00

    Try to specify “D:\Test\myhead” instead of “D:\Test” for all of configurations and platforms. You can also put both, separated by “;”. And use #include "myhead/testhead.h".

    Or reorganise the folders: move from “D:\Test\myhead\myhead” to “D:\Test\myhead” and remove the empty “D:\Test\myhead\myhead”.


0 additional answers

Sort by: Most helpful