I have written sample Makefile in windows which uses cl option from visual studio 2017. It causes the warnings as follow cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
Follow the below steps to reproduce the issue.
cl <filename>.cpp /std=c++11
Does it mean VS2017 by default it will support c++11, so cl option omitting c++11 flag (or) is there something else for throwing warning by cl.exe?
Can anyone please clarify regarding this issue?
Thanks,
Hari
See here. cl only accepts the options /std:c++14, /std:c++17, and /std:c++latest.
C++11 features are already enabled by default.
Examining the output of cl.exe /? for MSVC 2017, I found:
/std:<c++14|c++17|c++latest> C++ standard version
c++14 – ISO/IEC 14882:2014 (default)
c++17 – ISO/IEC 14882:2017
c++latest – latest draft standard (feature set subject to change)
It appears that:
/std:..., not -std=...If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With