一个MFC+pcl库实现的工程,debug模式下运行正常,因为要把exe拷到别的机子,需要编译release版本。
但是,报了以下错误
1> _D_SCL_SECURE_NO_WARNINGS
1>c1xx : fatal error C1083: 无法打开源文件: “_D_SCL_SECURE_NO_WARNINGS”: No such file or directory
1> stdafx.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\afx.h(38): warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be removed in a future version of MFC.
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\afx.h(33): note: 参见“MBCS_Support_Deprecated_In_MFC”的声明
应该怎么改呢,谢谢了~~
对比一下你的工程属性,Debug和Release,应该是Release的配置有漏掉一些,可以参考Debug的添加上
加一个宏就行了,vs有些不支持,认为有问题
emmmm,我自己解决了~分就给刚刚先回答我的同学吧。
是这样:
之前在使用Boost库的时候,出现如下错误:
error C4996: 'std::copy::_Unchecked_iterators::_Deprecate': Call to 'std::copy' 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'
1
我用了百度到的这个解决办法
在工程属性—>C/C++—>命令行—>其他选项 中添加:
-D_SCL_SECURE_NO_WARNINGS
然后我再release下把这个给删了,原来的错也没报。。。现在这个错也没了。。。那就这样吧。