Visual Studio warning about copies of files with different contents

前端 未结 13 776
北恋
北恋 2021-02-05 00:05

When I go to debug my C++ project in Visual Studio, up pops a little warning dialogue box that tells me:

A copy of datum.h was found in
c:/users/brad/desktop/sou         


        
13条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 00:38

    Could you by any chance be debugging another executable (not the one actually built?). This is a common issue in scenarios where Visual Studio builds the binaries in one directory but then they are copied over to some other directory for debugging. I'd suggest you compare the target path under the debugging settings and the output directory under the general settings in Visual Studio.

    TargetPath

    This would explain the issue, since you are actually debugging some older version of the binary (not the one built currently) and thus the warning, since Visual Studio can't find the version of the source files for that version of the binary.

提交回复
热议问题