[Dcmlib] Error Linking with Static Library gdcm.lib with VC 6.0 --> With gcc4.1, too

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri May 4 15:34:38 CEST 2007


There is not real interest in solving this issue. Those are old
examples. JPEG support is now completely integrated in gdcm (basically
code from those two examples was integrated in the main gdcm code).

sorry for the noise, but you can safely ignore those
-Mathieu

On 4/20/07, Jean-Pierre Roux <Jean-Pierre.Roux at creatis.insa-lyon.fr> wrote:
> Handschumacher, Mark D wrote:
>
> Hi, Mark.
> Thank you for repporting the bug.
>
> I use gcc 4.1.1, under FedoraCore 5, to tell the truth I think I didn't
> compiled gdcm in static since ages ...
> While linking Example/WriteDicomAsJPEG in static, I get the following error.
> (You miss an external symbol, on your computer, I get it twice on mine:-( )
>
> Scanning dependencies of target WriteDicomAsJPEG
> [ 87%] Building CXX object
> Example/CMakeFiles/WriteDicomAsJPEG.dir/WriteDicomAsJPEG.o
> Linking CXX executable ../bin/WriteDicomAsJPEG
> /tmp/binLin/bin/libgdcm.a(gdcmJpeg8.o): In function
> `gdcm_jpeg8_jpeg_stdio_src(jpeg_decompress_struct*,
> std::basic_istream<char, std::char_traits<char> >*, gdcm::JPEGFragment*,
> int)':
> gdcmJpeg8.cxx:(.text+0x22): multiple definition of
> `gdcm_jpeg8_jpeg_stdio_src(jpeg_decompress_struct*,
> std::basic_istream<char, std::char_traits<char> >*, gdcm::JPEGFragment*,
> int)'
> CMakeFiles/WriteDicomAsJPEG.dir/WriteDicomAsJPEG.o:WriteDicomAsJPEG.cxx:(.text+0x22):
> first defined here
> /tmp/binLin/bin/libgdcm.a(gdcmJpeg8.o): In function
> `gdcm_jpeg8_jpeg_stdio_dest(jpeg_compress_struct*,
> std::basic_ostream<char, std::char_traits<char> >*, unsigned int, int)':
> gdcmJpeg8.cxx:(.text+0x14c): multiple definition of
> `gdcm_jpeg8_jpeg_stdio_dest(jpeg_compress_struct*,
> std::basic_ostream<char, std::char_traits<char> >*, unsigned int, int)'
> CMakeFiles/WriteDicomAsJPEG.dir/WriteDicomAsJPEG.o:WriteDicomAsJPEG.cxx:(.text+0x14c):
> first defined here
>
> -> There is no fix, for the moment, I'm gonna try to find the mistake.
> So, for a while, better you go on with shared libs ...
>
> Jean-Pierre Roux
> from gdcm-team
>
>
> > I have created a static gdcm.lib file by turning the BUILD_SHARED_LIBS
> > OFF and have problems when I try to link a program. I get a list of
> > errors like:
> >
> > "gdcm.lib(gdcmJpeg8.obj) : error LNK2001: unresolved external symbol
> > __imp__gdcm_jpeg8…"
> >
> > Is there a fix.
> >
> > NOTE: The problems disappear when creating the gdcm DLL with the
> > BUILD_SHARED_LIBS ON.
> >
> > Thanks
> >
> > Mark
> >
> > The information transmitted in this electronic communication is
> > intended only for the person or entity to whom it is addressed and may
> > contain confidential and/or privileged material. Any review,
> > retransmission, dissemination or other use of or taking of any action
> > in reliance upon this information by persons or entities other than
> > the intended recipient is prohibited. If you received this information
> > in error, please contact the Compliance HelpLine at 800-856-1983 and
> > properly dispose of this information.
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > 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
>


-- 
Mathieu
Tel: +33 6 32 13 33 40




More information about the Dcmlib mailing list