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?

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,571 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jeanine Zhang-MSFT 9,341 Reputation points Microsoft Vendor
    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.