[Dcmlib] Compilation of gdcmunder Windows and Linux

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Feb 22 15:17:48 CET 2006


Salut Vincent,

	We have nightly+continuous dashboard on a variety of machine. I solve 
*very* recently a nasty bug in gdcm (to work around the brain damaged 
VS6). So I believe you can only compile the very latest gdcm 1.2 or very 
latest gdcm CVS.

HTH
Mathieu
Ref:
http://public.kitware.com/pipermail/insight-users/2006-February/016823.html

 > Hi,
 > I'm getting the following error while trying to build the cvs version:
 >
 > gdcmSerieHelper.obj : fatal error LNK1179: invalid or corrupt file:
 > duplicate comdat "?sort at std@@YAXPAPAVFile at gdcm@@0P6A_NPAV23 at 
1 at Z at Z"
 >
 > I google'd the error and it says it could happen if I have both a /H and
 > a /Gy options to my project in MSVC6 - I don't have either one. Any
 > suggestions?

This should be fixed in current CVS. Sorry for troubles.

Just because I spent too much time on this issue, here is the detail.
This problem is a big phat 'feature' of the obsolete VS6 compiler. This
is reported among its other 'features':
http://support.microsoft.com/kb/q243451/
-> http://support.microsoft.com/kb/q240871/

A solution is described in detail at:
http://www.codeguru.com/Cpp/Cpp/cpp_mfc/stl/article.php/c4079/
or
http://mail.python.org/pipermail/c++-sig/2003-November/006150.html

Basically I had to create a functor around the function:
http://www.itk.org/cgi-bin/viewcvs.cgi/Utilities/gdcm/src/gdcmSerieHelper.cxx?root=Insight&sortby=date&r2=1.21&r1=1.20

Hopefully ITK will soon stop supporting VS6 :)
Mathieu
Ps: The worse part is that it does not shows up in GDCM own dashboard
for some bizarre reason...


Vincent Daanen wrote:
> Hi all,
> 
> I'm a quite new user of gdcm.
> I succeed in compiling gdcm (both under windows (msvc6) and Linux 
> (Fedora Core).
> 
> but :
>    on a Windows pc, I can only use dll version of the lib because using 
> static lib generate tons of errors (lnk2005, conflict with msvcrtd;lib, 
> etc..). In general, I succeed to solve such problems but not in the case 
> of gdcm. Are there some 'known methods' to use gdcm static lib with mfc 
> static lib programs ?
> 
>    on a linux pc : - I can compile gdcm as shared lib and link against 
> the libs but any program (such as PrintFile) crashes (segmentation fault 
> !).
>                          - i can compile but I can't link which static 
> lib (error with jpeg2000) !
> 
> Is there a place where I can finn solutions to solve these problems ?
> 
> thanks
> 
> 
> vincent
> 
> 
> 




More information about the Dcmlib mailing list