Error "Cannot open source file" in c++

Malte Ekman 1 Reputation point
2021-08-30T11:00:34.643+00:00

So I am new in c++ and in visual studio, every time i try and build/debug, it always fails and basically all the files in "External Dependencies" comes up in the error list saying it cannot be opened.
I have checked the forum but nothing is explained clearly enough for me to understand, i have added the include folder to the additional include directories but nothing is working.
can someone help me?

Developer technologies | C++
Developer technologies | 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.
{count} votes

1 answer

Sort by: Most helpful
  1. Jeanine Zhang-MSFT 11,356 Reputation points Microsoft External Staff
    2021-08-31T02:27:00.83+00:00

    A:

    I suggest you should check your project settings, under C++, check include directories and make sure it points to where .h file. And I suggest you should use absolute path.

    And I suggest you should check if the platform and configuration settings are consistent with the build time.

    127715-image.png

    127648-image.png

    I suggest you could set them to ALL.

    127747-image.png

    Best Regards,

    Jeanine


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

Your answer

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