1

Warning 1 warning C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' c:\program files\microsoft visual studio 10.0\vc\include\xutility 2227

Assume that one solution has the following structure:

Solution
 - MainProject
 - Project1
 - Project2
 - Project3
 - Project4

Where The Main Project depends on Project1&4, Project1 depdents on Project 2&3. When the dependency gets complicated, it is really tedious and difficult to figure out which project compilation causes the warning.

Question> Is there a way that VS can tell me which project or which file that includes the unsafe function call? For example, does VS provide a switch that can print the build path?

For example:

Warning 1 warning C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' c:\program files\microsoft visual studio 10.0\vc\include\xutility 2227

4

1 回答 1

0

当我遇到这样的问题时,我会在 Visual Studio 中使用“在文件中搜索”。

选择“Edit->Find and Replace->Find In Files”,在出现的对话框中,在“Look in”中输入所有项目公共根目录的路径,在“Find what”中输入函数名。

于 2012-04-13T14:26:19.553 回答