Same Header File Is Different

a_unique_name 401 Reputation points
2024-05-06T18:03:25.1133333+00:00

Hello Folks:

Developing on Windows 10, up to date Visual Studio Community 2022, C++.

When building my application I occasionally see this error:

screen_shot

The two header files that Visual studio is complaining about are the same file.

Here is the text of the window. You can see for yourself:

A copy of window_control.h was found in D:\utilities\code\windows_files\headers\window_control.h, but the current source code is different from the version built into D:\utilities\code\windows_files\headers\window_control.h.

If you search for "\utilities\code\windows_files\headers\window_control.h" you'll see this is the same path and file name for the two files that have different source code.

I can go months without seeing this problem, but when it hits it's annoying.

The offending source code can be in different files in different paths.

Restarting Visual Studio usually doesn't resolve the problem and a system reboot is required. Today restarting Visual Studio did resolve the issue and a reboot wasn't required.

Any idea why this is happening?

Thanks
Larry

Developer technologies C++
{count} votes

1 answer

Sort by: Most helpful
  1. a_unique_name 401 Reputation points
    2024-05-07T16:05:12.5266667+00:00

    This was supposed to be a question for RLWA32.

    It disappeared so I re-asked.

    I don't seem to be able to erase it, so please ignore.

    Larry


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.