AW: AW: [Insight-users] So many warnings after moving with ITK
toVS 2005
Luis Ibanez
luis.ibanez at kitware.com
Sun Jun 10 09:13:52 EDT 2007
Hi Zein,
Thanks for letting us know that you found the solution
to the problem of warnings in Visual Studio 2005.
Regards,
Luis
---------------------
Zein Salah wrote:
> Hi Luis,
>
> You are right. I found the options at the top of the CMakeList file of ITK.
>
> It was my own application that produced the warnings, not ITK. I added the
> options to my application and the problem was solved.
>
> Much thanks for the help.
>
> Zein
>
> -----Ursprüngliche Nachricht-----
> *Von:* insight-users-bounces+salah=gris.uni-tuebingen.de at itk.org im
> Auftrag von Luis Ibanez
> *Gesendet:* So 10.06.2007 00:25
> *An:* Zein Salah
> *Cc:* Insight Users
> *Betreff:* Re: AW: [Insight-users] So many warnings after moving
> with ITK toVS 2005
>
>
>
> Hi Zein,
>
> Actually, after looking again, we do define this flag
> in the top CMakeLists.txt file of ITK.
>
> The flag was added on August 23 2005, so it has been
> there for a while.
>
> Look at lines 8 to 31 of the top CMakeLists.txt file.
>
>
> What version of ITK are you using ?
>
>
>
> Thanks
>
>
> Luis
>
>
>
> -----------------
> Zein Salah wrote:
> > Hello Luis,
> >
> > yes, I am using CMake 2.4.6 for configuring for Visual Studio 2005.
> > Strangely, CMake does NOT add this option to the CMakeCache!
> > Maybe I should add it manually?
> >
> > thanks,
> > Zein
> >
> > -----Ursprüngliche Nachricht-----
> > *Von:* Luis Ibanez [mailto:luis.ibanez at kitware.com]
> > *Gesendet:* Sa 09.06.2007 23:08
> > *An:* Sean McBride
> > *Cc:* Zein Salah; insight-users at itk.org
> > *Betreff:* Re: [Insight-users] So many warnings after moving with
> > ITK to VS 2005
> >
> >
> > Hi Zein,
> >
> > What version of CMake are you using ?
> >
> > CMake 2.4.6 automatically adds the option
> >
> > _CRT_SECURE_NO_DEPRECATE
> >
> > to the CMakeCache when configuring for
> > Visual Studio 2005.
> >
> >
> > As you will see, the warning that you find do not
> > happen in the ITK Dashboard, where we have several
> > VS2005 submissions.
> >
> >
> > Regards,
> >
> >
> > Luis
> >
> >
> >
> >
> > ---------------------
> > Sean McBride wrote:
> > > On 2007-06-08 14:27, Zein Salah said:
> > >
> > >
> > >>After I upgrade my environment to Visual Studio 2005, I am
> > getting -by
> > >>compiling my programs- a long list of warnings. Most are
> like the
> > one below
> > >>
> > >>
> > >>
> >
> >>D:\InsightApplications320\Auxiliary\FltkImageViewer\SliceView.h(492)
> > :
> > >>warning C4996: 'sprintf' was declared deprecated
> > >> C:\Program Files\Microsoft Visual Studio 8\VC\include
> > >>\stdio.h(345) : see declaration of 'sprintf'
> > >> Message: 'This function or variable may be unsafe.
> Consider
> > >>using sprintf_s instead. To disable deprecation, use
> > >>_CRT_SECURE_NO_DEPRECATE. See online help for details.'
> > >>
> > >>Can I do anything against this? Is there something I should
> > correct? Or
> > >>I can simply ignore these warnings?
> > >
> > >
> > > The message suggests a solution: use
> _CRT_SECURE_NO_DEPRECATE to
> > > suppress the warning. However, the warning is quite correct,
> > sprintf()
> > > is evil and should never be used. The best thing to do,
> if you
> > are so
> > > inclined, is to fix ITK and supply a patch to kitware.
> However,
> > I think
> > > snprintf() is a better solution than sprintf_s(), as the
> latter
> > is not
> > > portable.
> > >
> >
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list