What does “use -D_SCL_SECURE_NO_WARNINGS” mean?

后端 未结 4 646
青春惊慌失措
青春惊慌失措 2020-12-13 19:32

I\'ve got an error trying to compile my curve compression program, error no C4996, function call with parameters may be unsafe. It\'s telling me to use the above. The error

4条回答
  •  被撕碎了的回忆
    2020-12-13 19:58

    -D means "define a macro", in this case _SCL_SECURE_NO_WARNINGS. Which mean somewhere in the code there's a

    #if defined(_SCL_SECURE_NO_WARNINGS)
    

    line. If you want to do this from inside VS, go to the project's properties page, and under one fo the tabs there should be a spot to add new defines. There should already be some listed (like DEBUG). Add _SCL_SECURE_NO_WARNINGS there.

提交回复
热议问题