3

I am using Visual Studio 2013 and ITK 4.3 for image segmentation but it has an error:

\itk4.3.1-64bit\debug\include\itk-4.3\gdcmVR.h(168): error C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

how to overcome this error?

nguyen cuong
  • 31
  • 1
  • 6
  • Is this in building `ITK` or using `ITK` with your application. If it is using `ITK` with your application are you using `CMake` to generate the project file for your application? – drescherjm May 11 '16 at 15:31
  • The answer is on http://stackoverflow.com/a/900363/383779 – sergiol May 13 '16 at 09:39

1 Answers1

0

In general you could do the following, but if you are using cmake then you might want to add this option as an additional compiler flag in cmake.

Right click on the project, then navigate to

  • Configuration Properties
  • C/C++
  • Command Line

Down below in the Additional Options section you can add: -D_SCL_SECURE_NO_WARNINGS

example

Additional information here.

Community
  • 1
  • 1
wally
  • 10,717
  • 5
  • 39
  • 72
  • This may not work well for `ITK` since the project file is generated using `CMake`. Every time a `CMake` generation is triggered all compiler settings that are manually added will be thrown out. – drescherjm May 11 '16 at 15:27
  • @drescherjm Good point, I've make a mention of this in the answer. – wally May 11 '16 at 15:37