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!!!

Developer technologies C++
Developer technologies Visual Studio Other
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 122.6K 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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.