Visual Studio can't 'see' my included header files

后端 未结 10 1146
囚心锁ツ
囚心锁ツ 2020-12-10 00:30

I created an empty \'Demo\' project in Visual Studio 2008 and added some existing projects to my solution. Included \"MyHeader.h\" (other project\'s header) in main.cpp file

相关标签:
10条回答
  • 2020-12-10 01:31

    Try adding the header file to your project's files. (right click on project -> add existing file).

    0 讨论(0)
  • 2020-12-10 01:32

    Here's how I solved this problem.

    • Go to Project --> Show All Files.

    • Right click all the files in Solutions Explorer and Click on Include in Project in all the files you want to include.

    Done :)

    0 讨论(0)
  • 2020-12-10 01:33

    If you choose Project and then All Files in the menu, all files should be displayed in the Solution Explorer that are physically in your project map, but not (yet) included in your project. If you right click on the file you want to add in the Solution Explorer, you can include it.

    0 讨论(0)
  • 2020-12-10 01:33

    In my experience, with VS2010, when include files can't be found at compile time, doing a clean, then build usually fixes the problem. It's not that rare for the editor to be able to open an include file and then the compiler to announce that it can't find that very file, even when it is open on the screen!

    0 讨论(0)
提交回复
热议问题