您的位置:首页 > 其它

在VS2012中 集成protobuf 文件时, 编译出现问题

2017-04-28 16:48 1391 查看
在VS2012中 集成protobuf 文件时, 编译出现问题:

1.people.pb.cc(448): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?

解决方案:

在 people.pb.cc 上右键属性-> C/C++ ->预编译头(选择不使用预编译头)

2.xutility(2176): error 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'

1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility(2157) : see declaration of 'std::_Copy_impl'

解决方案:

属性 -> C/C++ -> 预处理器 -> 预处理器定义 (添加 _SCL_SECURE_NO_WARNINGS)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐