On Sun, Sep 16, 2012 at 9:52 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When I build even something very very simple like this with the MSVC<br>
2010 compiler:<br>
<br>
#include "itkImage.h"<br>
#include "itkImageFileReader.h"<br>
<br>
int main(int argc, char *argv[])<br>
{<br>
typedef itk::Image< double, 2 > ImageType;<br>
typedef itk::ImageFileReader<ImageType> ReaderType;<br>
<br>
ReaderType::Pointer reader = ReaderType::New();<br>
reader->SetFileName(argv[1]);<br>
reader->Update();<br>
<br>
return EXIT_SUCCESS;<br>
}<br>
<br>
<br>
I get:<br>
<br>
----------------------<br>
C:\Program Files\Microsoft Visual Studio<br>
10.0\VC\INCLUDE\xutility:2227: warning: C4996: 'std::_Copy_impl':<br>
Function call with parameters that may be unsafe - this call relies on<br>
the caller to check that the passed values are correct. To disable<br>
this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how<br>
to use Visual C++ 'Checked Iterators'<br>
<br>
C:\Program Files\Microsoft Visual Studio<br>
10.0\VC\INCLUDE\xutility:2212: see declaration of 'std::_Copy_impl'<br>
<br>
c:\src\itk\modules\io\imagebase\include\itkImageFileReader.hxx:440:<br>
see reference to function template instantiation '_OutIt<br>
std::copy<const double*,double*>(_InIt,_InIt,_OutIt)' being compiled<br>
with<br>
[<br>
_OutIt=double *,<br>
_InIt=const double *<br>
]<br>
<br>
c:\src\itk\modules\io\imagebase\include\itkImageFileReader.hxx:353:<br>
while compiling class template member function 'void<br>
itk::ImageFileReader<TOutputImage>::GenerateData(void)'<br>
with<br>
[<br>
TOutputImage=ImageType<br>
]<br>
<br>
C:\src\TestITK\TestITK.cxx:9: see reference to class template<br>
instantiation 'itk::ImageFileReader<TOutputImage>' being compiled<br>
with<br>
[<br>
TOutputImage=ImageType<br>
]<br>
----------------------<br>
<br>
Has anyone seen this? Is this D_SCL_SECURE_NO_WARNINGS something that<br>
should be added to ITKSetStandardCompilerFlags.cmake? Or is there a<br>
better explanation?<br>
<br>
Thanks,<br>
<br>
David<br>
</blockquote></div><br><div>Any thoughts on this?<br clear="all"><br>David<br></div>