4

I have a ATL C++ project and I don't have any includes in one of my C++ source files.

When I try to compile, I am receiving a PCH warning:

Error (active) E2940 PCH warning: an unknown error occurred. An IntelliSense PCH file was not generated.

But the project compiles fine alongside with this warning.

I tried adding #pragma once and include "stdafx.h" as mentioned in this post, but any of them did not resolve this issue.

What else can I do to resolve this issue?

GTAVLover
  • 1,294
  • 2
  • 15
  • 34

2 Answers2

5

As mentioned in this answer, closing and re-opening the solution worked fine for me.

GTAVLover
  • 1,294
  • 2
  • 15
  • 34
  • 1
    Hi GTAVLover, glad to hear that your issue is solved and please mark your reply as answer when you have free time :) , it will help other community members to easier search this information. – Sara Liu - MSFT Aug 15 '17 at 09:31
0

In my experience, I just had an error in the program with std so I started using namespace std and it worked. I also added #pragma once

GPme
  • 1