DCMTK v3.6.0 and ZLIB v1.2.5 linker errors (VS 2010)
Moderator: Moderator Team
DCMTK v3.6.0 and ZLIB v1.2.5 linker errors (VS 2010)
Hi all,
I'm using Visual Studio 2010.
I'm trying to compile DCMTK v3.6.0 with ZLIB v1.2.5.
I need to obtain 4 set of libraries (i.e. Win32MD, Win32MT, Win64MD, Win64MT).
I already compiled ZLIB-MD-32, ZLIB-MT-32, ZLIB-MD-64, ZLIB-MT-64 with success.
I created DCMTK-MD-32 VS 2010 solution, DCMTK-MT-32 VS 2010 solution, DCMTK-MD-64 VS 2010 solution and DCMTK-MT-64 VS 2010 solution. Pointing to the correct ZLIB library.
I'm able to compile DCMTK-MD-64 and DCMTK-MT-64.
I encounter linker errors compiling DCMTK-MD-32 and DCMTK-MT-32.
40>dcmdata.lib(dcistrmz.obj) : error LNK2019: unresolved external symbol _inflateInit2_ referenced in function "public: __thiscall DcmZLibInputFilter::DcmZLibInputFilter(void)" (??0DcmZLibInputFilter@@QAE@XZ)
40>dcmdata.lib(dcistrmz.obj) : error LNK2019: unresolved external symbol _inflateInit_ referenced in function "public: __thiscall DcmZLibInputFilter::DcmZLibInputFilter(void)" (??0DcmZLibInputFilter@@QAE@XZ)
40>dcmdata.lib(dcistrmz.obj) : error LNK2019: unresolved external symbol _inflateEnd referenced in function "public: virtual __thiscall DcmZLibInputFilter::~DcmZLibInputFilter(void)" (??1DcmZLibInputFilter@@UAE@XZ)
40>dcmdata.lib(dcistrmz.obj) : error LNK2019: unresolved external symbol _inflate referenced in function "private: __int64 __thiscall DcmZLibInputFilter::decompress(void const *,__int64)" (?decompress@DcmZLibInputFilter@@AAE_JPBX_J@Z)
40>dcmdata.lib(dcostrmz.obj) : error LNK2019: unresolved external symbol _deflateInit2_ referenced in function "public: __thiscall DcmZLibOutputFilter::DcmZLibOutputFilter(void)" (??0DcmZLibOutputFilter@@QAE@XZ)
40>dcmdata.lib(dcostrmz.obj) : error LNK2019: unresolved external symbol _deflateEnd referenced in function "public: virtual __thiscall DcmZLibOutputFilter::~DcmZLibOutputFilter(void)" (??1DcmZLibOutputFilter@@UAE@XZ)
40>dcmdata.lib(dcostrmz.obj) : error LNK2019: unresolved external symbol _deflate referenced in function "private: __int64 __thiscall DcmZLibOutputFilter::compress(void const *,__int64,bool)" (?compress@DcmZLibOutputFilter@@AAE_JPBX_J_N@Z)
I'm sure the linker is pointing the correct ZLIB library.
Any help is appreciated.
Thank you and best regards
I'm using Visual Studio 2010.
I'm trying to compile DCMTK v3.6.0 with ZLIB v1.2.5.
I need to obtain 4 set of libraries (i.e. Win32MD, Win32MT, Win64MD, Win64MT).
I already compiled ZLIB-MD-32, ZLIB-MT-32, ZLIB-MD-64, ZLIB-MT-64 with success.
I created DCMTK-MD-32 VS 2010 solution, DCMTK-MT-32 VS 2010 solution, DCMTK-MD-64 VS 2010 solution and DCMTK-MT-64 VS 2010 solution. Pointing to the correct ZLIB library.
I'm able to compile DCMTK-MD-64 and DCMTK-MT-64.
I encounter linker errors compiling DCMTK-MD-32 and DCMTK-MT-32.
40>dcmdata.lib(dcistrmz.obj) : error LNK2019: unresolved external symbol _inflateInit2_ referenced in function "public: __thiscall DcmZLibInputFilter::DcmZLibInputFilter(void)" (??0DcmZLibInputFilter@@QAE@XZ)
40>dcmdata.lib(dcistrmz.obj) : error LNK2019: unresolved external symbol _inflateInit_ referenced in function "public: __thiscall DcmZLibInputFilter::DcmZLibInputFilter(void)" (??0DcmZLibInputFilter@@QAE@XZ)
40>dcmdata.lib(dcistrmz.obj) : error LNK2019: unresolved external symbol _inflateEnd referenced in function "public: virtual __thiscall DcmZLibInputFilter::~DcmZLibInputFilter(void)" (??1DcmZLibInputFilter@@UAE@XZ)
40>dcmdata.lib(dcistrmz.obj) : error LNK2019: unresolved external symbol _inflate referenced in function "private: __int64 __thiscall DcmZLibInputFilter::decompress(void const *,__int64)" (?decompress@DcmZLibInputFilter@@AAE_JPBX_J@Z)
40>dcmdata.lib(dcostrmz.obj) : error LNK2019: unresolved external symbol _deflateInit2_ referenced in function "public: __thiscall DcmZLibOutputFilter::DcmZLibOutputFilter(void)" (??0DcmZLibOutputFilter@@QAE@XZ)
40>dcmdata.lib(dcostrmz.obj) : error LNK2019: unresolved external symbol _deflateEnd referenced in function "public: virtual __thiscall DcmZLibOutputFilter::~DcmZLibOutputFilter(void)" (??1DcmZLibOutputFilter@@UAE@XZ)
40>dcmdata.lib(dcostrmz.obj) : error LNK2019: unresolved external symbol _deflate referenced in function "private: __int64 __thiscall DcmZLibOutputFilter::compress(void const *,__int64,bool)" (?compress@DcmZLibOutputFilter@@AAE_JPBX_J_N@Z)
I'm sure the linker is pointing the correct ZLIB library.
Any help is appreciated.
Thank you and best regards
-
- DCMTK Developer
- Posts: 2051
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi Michael,
thank you for the reply.
I checked the linking order and it is correct.
As an additional information I can say that using the ZLIB library compiled 2 years ago (v1.2.3) on Visual Studio 2005 I obtain a lot of warnings but non linking errors. It seems something is strange in this ZLIB 32 bit compiled by VS 2010.
I checked the zlibstat project settings and all seems to be correct. It's a big headache!
Regards
thank you for the reply.
I checked the linking order and it is correct.
As an additional information I can say that using the ZLIB library compiled 2 years ago (v1.2.3) on Visual Studio 2005 I obtain a lot of warnings but non linking errors. It seems something is strange in this ZLIB 32 bit compiled by VS 2010.
I checked the zlibstat project settings and all seems to be correct. It's a big headache!
Regards
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
What about using the pre-compiled DCMTK Windows support libraries?
-
- DCMTK Developer
- Posts: 2051
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
I can't tell exactly since the guy that did this here at OFFIS for DCMTK 3.6.0 is not available anymore. However, earlier we compiled ZLIB on the commandline, using nmake. This needs some adaptions of the ZLIB sources in order to use the correct compiler flags. Also, MASM32 has to be installed.
Michael
I can't tell exactly since the guy that did this here at OFFIS for DCMTK 3.6.0 is not available anymore. However, earlier we compiled ZLIB on the commandline, using nmake. This needs some adaptions of the ZLIB sources in order to use the correct compiler flags. Also, MASM32 has to be installed.
Michael
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Who is online
Users browsing this forum: No registered users and 1 guest