Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exprtk parser not working on VS 2015?

I am trying to use the parser from this site:

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

on VS 2015. Unfortunately, I get the following error while compiling exprtk_simple_example_01 (one of the example files included in the download with the parser):

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    

Why is that? Is this parser not compatible with VS 2015?

like image 489
Revist Avatar asked Mar 08 '16 00:03

Revist


1 Answers

THE SOLUTION IS:

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!

like image 131
Bo Persson Avatar answered Sep 27 '22 20:09

Bo Persson