When I build even something very very simple like this with the MSVC
2010 compiler:

#include "itkImage.h"
#include "itkImageFileReader.h"

int main(int argc, char *argv[])
{
  typedef itk::Image< double, 2 >         ImageType;
  typedef itk::ImageFileReader<ImageType> ReaderType;

  ReaderType::Pointer reader = ReaderType::New();
  reader->SetFileName(argv[1]);
  reader->Update();

  return EXIT_SUCCESS;
}


I get:

----------------------
C:\Program Files\Microsoft Visual Studio
10.0\VC\INCLUDE\xutility:2227: warning: 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'

C:\Program Files\Microsoft Visual Studio
10.0\VC\INCLUDE\xutility:2212: see declaration of 'std::_Copy_impl'

c:\src\itk\modules\io\imagebase\include\itkImageFileReader.hxx:440:
see reference to function template instantiation '_OutIt
std::copy<const double*,double*>(_InIt,_InIt,_OutIt)' being compiled
with
[
    _OutIt=double *,
    _InIt=const double *
]

c:\src\itk\modules\io\imagebase\include\itkImageFileReader.hxx:353:
while compiling class template member function 'void
itk::ImageFileReader<TOutputImage>::GenerateData(void)'
with
[
    TOutputImage=ImageType
]

C:\src\TestITK\TestITK.cxx:9: see reference to class template
instantiation 'itk::ImageFileReader<TOutputImage>' being compiled
with
[
    TOutputImage=ImageType
]
----------------------

Has anyone seen this? Is this D_SCL_SECURE_NO_WARNINGS something that
should be added to ITKSetStandardCompilerFlags.cmake? Or is there a
better explanation?

Thanks,

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers

Reply via email to