[Dcmlib] RE: Visual Studio 2005

Marco Feuerstein feuerste at cs.tum.edu
Sat Nov 26 17:36:30 CET 2005


Mathieu,


I investigated a bit more into it:
I have no problems at all, if I compile my application in Debug mode and use
the Debug gdcm lib as well. The same applies for the Release version, if I
use the gdcm Release version.

However, the problem arises, when I compile my application in Debug mode,
but use the gdcm Release lib, or if I compile my code in Release and use the
gdcm Debug lib... That's really strange.
I have never experienced that for any libraries. I was always able to
happily mix them.


I also tried to include the debug output you suggested. The filename is
fine.


By the way, would you mind to include following lines somewhere in the top
level CMakeLists.txt:

IF(WIN32)
SET(CMAKE_DEBUG_POSTFIX "D")
ENDIF(WIN32)

This will append a 'D' to the resulting debug libraries' and dlls' names, so
the release and debug versions can be distinguished properly. Thank you.


Best regards,
Marco


> -----Original Message-----
> From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com] 
> Sent: Freitag, 25. November 2005 19:09
> To: Marco Feuerstein
> Cc: dcmlib at creatis.insa-lyon.fr
> Subject: Re: [Dcmlib] RE: Visual Studio 2005
> 
> Marco,
> 
> 	As I don't have access to this compiler, could you do 
> me a favor. Could 
> you add a std::cerr in the code of gdcmDirList.cxx:
> 
> int DirList::Explore...
> ...
>   for(BOOL b = (hFile != INVALID_HANDLE_VALUE); b;
>         b = FindNextFile(hFile, &fileData))
>     {
>        fileName = fileData.cFileName;
>        std::cerr << fileName << std::endl; <--- here
> 
> And let me know if something weird happen in Release mode.
> 
> Thanks in advance
> Mathieu
> 
> Mathieu Malaterre wrote:
> > Marco,
> > 
> >     Yeah that scary, it only means that when building in 
> Debug, every 
> > declared object is set to zero which is -apparently- needed later.
> > 
> >     The thing is that borland and valgrind useually show this stuff.
> > 
> > Thanks for the report, I'll try to investigate
> > Mathieu
> > 
> > 
> > Marco Feuerstein wrote:
> > 
> >> Hi,
> >>
> >> I just realized, that the vs 2005 build of gdcm just seems to work 
> >> with the
> >> Debug version. Any optimizer flags will skrew it up...
> >>
> >> Cheers,
> >> Marco
> >>
> >>
> >>> -----Original Message-----
> >>> From: Marco Feuerstein [mailto:feuerste at cs.tum.edu] Sent: 
> Donnerstag, 
> >>> 24. November 2005 16:51
> >>> To: 'dcmlib at creatis.insa-lyon.fr'
> >>> Subject: Visual Studio 2005
> >>>
> >>> Hi there,
> >>>
> >>> have you ever tried to compile the current cvs version of 
> gdcm with 
> >>> VS 2005?
> >>> I get a very strange behaviour.
> >>> After building the libs successfully I just do the following:
> >>>
> >>> gdcm::SerieHelper *s;
> >>> s = gdcm::SerieHelper::New();
> >>> s->SetDirectory(dirName, recursive);
> >>>
> >>> When calling SetDirectory, I always get an
> >>> exception: std::bad_alloc at memory location 0x0012f278
> >>>
> >>>
> >>> Do you have any idea, why that happens?
> >>>
> >>> Best regards,
> >>> Marco
> >>>
> >>> ---
> >>> Marco Feuerstein
> >>>
> >>> Chair for Computer Aided Medical Procedures & Augmented 
> Reality (I-16)
> >>> Department of Informatics
> >>> Technische Universität München
> >>> Boltzmannstr. 3
> >>> 85748 Garching b. München
> >>> Germany
> >>> Tel: +49 89 289-17077
> >>> Fax: +49 89 289-17059
> >>> http://campar.in.tum.de/Main/MarcoFeuerstein
> >>
> >>
> >>
> >>
> >> 
> --------------------------------------------------------------
> ----------
> >>
> >> _______________________________________________
> >> Dcmlib mailing list
> >> Dcmlib at creatis.insa-lyon.fr
> >> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
> > 
> > 
> > _______________________________________________
> > Dcmlib mailing list
> > Dcmlib at creatis.insa-lyon.fr
> > http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
> > 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5799 bytes
Desc: not available
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20051126/6cbfbe32/attachment.bin>


More information about the Dcmlib mailing list