gpt4 book ai didi

c++ - Exprtk 解析器无法在 VS 2015 上运行?

转载 作者:可可西里 更新时间:2023-11-01 16:22:16 25 4
gpt4 key购买 nike

我正在尝试使用来自该站点的解析器:

http://www.partow.net/programming/exprtk/

在 VS 2015 上。不幸的是,我在编译 exprtk_simple_example_01(解析器下载中包含的示例文件之一)时出现以下错误:

Severity    Code    Description Project File    Line    Suppression State
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' TEST
c:\program files (x86)\microsoft visual studio 14.0\vc\include\xutility 2229

这是为什么呢?此解析器与 VS 2015 不兼容吗?

最佳答案

解决方案是:

In solution explorer, right click the project, select "properties". The project property page will open. Expand the ">C/C++" entry in the tree on the left and select "Preprocessor" under that. The top entry in the right pane should be "Preprocessor Definitions". In that edit box, add _SCL_SECURE_NO_WARNINGS, separating it from the other entries with a ;

Then set the linker flag /bigobj!

关于c++ - Exprtk 解析器无法在 VS 2015 上运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35856562/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com