how to use DCMTK 3.6.1 on win7

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
qimo601
Posts: 32
Joined: Wed, 2012-06-06, 07:38

how to use DCMTK 3.6.1 on win7

#1 Post by qimo601 »

hi,all.

I am using DCMTK 3.6.0 on win7 system.

But I found a lot of changes in DcmNet module about DcmScu and DcmScp.

How can i compile the latest snapshot (DCMTK3.6.1) rightly on windows??? Is that only open to Linux???

Is there any better ways to use the snapShot on windows??

qimo601
Posts: 32
Joined: Wed, 2012-06-06, 07:38

Re: how to use DCMTK 3.6.1 on win7

#2 Post by qimo601 »

Then i compile DCMTK 3.6.1 with dcmtk-3.6.0-win32-i386-support_MD.zipl on VS2008.
Finally it failed.
========== Build: 77 succeeded, 5 failed, 2 up-to-date, 0 skipped ==========

Code: Select all

Linking...
LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(strftime.obj) : error LNK2005: _strftime already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)

Roadrunner
Posts: 56
Joined: Mon, 2010-06-14, 16:41

Re: how to use DCMTK 3.6.1 on win7

#3 Post by Roadrunner »

Do you use a 32 bit or a 64 bit version of Windows 7?

qimo601
Posts: 32
Joined: Wed, 2012-06-06, 07:38

Re: how to use DCMTK 3.6.1 on win7

#4 Post by qimo601 »

Roadrunner wrote:Do you use a 32 bit or a 64 bit version of Windows 7?
win7 32bit + VS2008 +Qt4.7.4

DCMTK3.6.1 + DCMTK3.6.0 support MD.

how to compile ?

omarelgazzar
Posts: 101
Joined: Wed, 2009-07-08, 16:06
Location: Oldenburg, Germany

Re: how to use DCMTK 3.6.1 on win7

#5 Post by omarelgazzar »

Did you read FAQ#26?

qimo601
Posts: 32
Joined: Wed, 2012-06-06, 07:38

Re: how to use DCMTK 3.6.1 on win7

#6 Post by qimo601 »

omarelgazzar wrote:Did you read FAQ#26?
Thanks,I see.

I have changed the CmakeLists.txt ,but I only use the DCMTK 3.6.0 support libraries (MD) to compile the DCMTK3.6.1.
Is that have a problem????

You can change the code generation options centrally in file dcmtk/CMakeLists.txt by replacing "/MT" with "/MD" and "/MTd" with "/MDd". You then have to run CMake to create new project files for the complete DCMTK toolkit. If you do this change, however, please note that you also have to provide all external libraries (zlib, openssl etc.) in pre-compiled versions generated with "/MD" or "/MDd". Alternatively, you can disable the use of this external libraries in CMake.

omarelgazzar
Posts: 101
Joined: Wed, 2009-07-08, 16:06
Location: Oldenburg, Germany

Re: how to use DCMTK 3.6.1 on win7

#7 Post by omarelgazzar »

If you use the DCMTK support libraries precompiled with the code generation options (/MD and /MDd), then you have to make sure you are also compiling dcmtk using the same options (/MD and /MDd). The default is that dcmtk will be compiled using (/MT and /MTd). So, you need to change the CMakeLists.txt as mentioned in the FAQ#26. Another solution is to download the dcmtk support libraries precompiled with (/MT and /MTd) and compile it with dcmtk with the default option.

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: how to use DCMTK 3.6.1 on win7

#8 Post by J. Riesmeier »

Instead of modifying the main CMakeLists.txt file, I would propose to simply disable the option DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS in the CMake GUI.

qimo601
Posts: 32
Joined: Wed, 2012-06-06, 07:38

Re: how to use DCMTK 3.6.1 on win7

#9 Post by qimo601 »

J. Riesmeier wrote:Instead of modifying the main CMakeLists.txt file, I would propose to simply disable the option DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS in the CMake GUI.
Thanks,J. Riesmeier.
Your suggestion is very good for me ,it has workd out the run time library error .

But if I compiled the DCMTK3.6.1 as the file_install.html said.As follows:
DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS = OFF;
libxml2 support :
set "DCMTK_WITH_XML" to "ON" and
set "WITH_LIBXMLINC" e.g. to "C:\libxml2-2.7.7"
libpng support:
set "DCMTK_WITH_PNG" to "ON" and
set "WITH_LIBPNGINC" e.g. to "C:\libpng-1.4.2"
libtiff support:
set "DCMTK_WITH_TIFF" to "ON" and
set "WITH_LIBTIFFINC" e.g. to "C:\tiff-3.9.2"
OpenSSL support:
set "DCMTK_WITH_OPENSSL" to "ON" and
set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.0.0"
zlib support:
set "DCMTK_WITH_ZLIB" to "ON" and
set "WITH_ZLIBINC" e.g. to "C:\zlib-1.2.5"
libiconv support:
set "DCMTK_WITH_ICONV" to "ON" and
set "WITH_LIBICONVINC" e.g. to "C:\libxml2-2.7.7" (There isn't libiconv file in 3.6.0 support(MD))

After compile, It had some errors on VS2008.
Error:
1、LINK : fatal error LNK1104: cannot open file 'libiconv_d.lib'

It need libiconv support(MD) library.....where can i get it ?

qimo601
Posts: 32
Joined: Wed, 2012-06-06, 07:38

Re: how to use DCMTK 3.6.1 on win7

#10 Post by qimo601 »

J. Riesmeier wrote:Instead of modifying the main CMakeLists.txt file, I would propose to simply disable the option DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS in the CMake GUI.

I have downloaded the ibiconv-1.13.1.tar.gz

But it is original code.
How to compile ibiconv-1.13.1 source code on win7 VS2008????

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: how to use DCMTK 3.6.1 on win7

#11 Post by J. Riesmeier »

The easiest thing would be to disable the support for libiconv in CMake. Since this external library has been added after the release of DCMTK 3.6.0, there is no ready-to-use support library package for Windows available yet.

qimo601
Posts: 32
Joined: Wed, 2012-06-06, 07:38

Re: how to use DCMTK 3.6.1 on win7

#12 Post by qimo601 »

J. Riesmeier wrote:The easiest thing would be to disable the support for libiconv in CMake. Since this external library has been added after the release of DCMTK 3.6.0, there is no ready-to-use support library package for Windows available yet.
So thanks.

Chung-Yueh Lien
Posts: 61
Joined: Wed, 2010-05-19, 09:27
Location: Taipei, Taiwan

Re: how to use DCMTK 3.6.1 on win7

#13 Post by Chung-Yueh Lien »

qimo601 wrote: libiconv support:
set "DCMTK_WITH_ICONV" to "ON" and
set "WITH_LIBICONVINC" e.g. to "C:\libxml2-2.7.7" (There isn't libiconv file in 3.6.0 support(MD))

After compile, It had some errors on VS2008.
Error:
1、LINK : fatal error LNK1104: cannot open file 'libiconv_d.lib'
It need libiconv support(MD) library.....where can i get it ?
Two libraries of libiconv with MD supported are named as iconv_o.lib (for release) and iconv_d.lib(for debug) stored in dcmtk-3.6.0-win32-i386-support_MD.zip. You can copy and rename them as libiconv_o.lib and libiconv_d.lib, respectively.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest