Installation problems on Win 7 64 bits

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
VMMF
Posts: 4
Joined: Fri, 2014-09-26, 08:29

Installation problems on Win 7 64 bits

#1 Post by VMMF »

Hello, I’m facing some errors while trying to compile the 3.6.0 DCMTK library. My scenario is Win7 x64, Visual Studio 2012 and I want to include DCMTK and some of the 3rd party libraries into an MFC kind of project. I´ve read in FAQ #26 that in order to use DCMTK with MFC I require to compile DCMTK with "Multithreaded DLL" or "Multithreaded DLL Debug" and I should make the following changes in the CMakeLists.txt “ replacing "/MT" with "/MD" and "/MTd" with "/MDd". Moreover I also have to provide all external libraries (zlib, openssl etc.) in pre-compiled versions generated with "/MD" or "/MDd".
1) In Cmake 3.0.2:
I uncheck DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS because I want to use MDd for code generation (according to J. Riesmeier Post on: Thu, 2013-12-05, 10:28, Post subject: Re: Cmakelist.txt of 3.6.1 missing Platform-specific setting)
I uncheck DCMTK_WITH_DOXYGEN
I check DCMTK_WITH_OPENSSL, DCMTK_WITH_PNG, DCMTK_WITH_PRIVATE_TAGS, DCMTK_WITH_THREADS, DCMTK_WITH_TIFF, DCMTK_WITH_XML, DCMTK_WITH_ZLIB and I supply the corresponding paths in the uncompressed dcmtk-3.6.0-win32-i386-support_MD folder to the variables WITH_LIBPNGINC … WITH_ZLIBINC.
I do all this and it doesn´t matter which compiler version (VS2012 x64, VS2012 x86 or even VS2010 x 86) I choose in CMake, it always throws the following warning when I press the generate button:

Code: Select all

CMake Warning (dev) at CMakeLists.txt:240 (INCLUDE): Syntax Warning in cmake code at
D:/0/dcmtk-3.6.0/CMake/3rdparty.cmake:9:70
Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.
And then:

Code: Select all

Info: DCMTK XML support will be enabled
Info: DCMTK PNG support will be enabled
Info: DCMTK TIFF support will be enabled
Info: DCMTK OPENSSL support will be enabled
Info: DCMTK ZLIB support will be enabled
Info: DCMTK's builtin private dictionary support will be enabled
Info: Thread support will be enabled
Configuring done
2) In Visual Studio (just compiling DCMTK no extra code)
If I compiled with VS2012 x64 (Win 64) I get the following errors LNK2019 and LNK 2001
If I compiled with VS2012 x32 (Win 32) I get the following errors LNK2026 and LNK 1281.

Code: Select all

error LNK2026: módulo no seguro de una imagen SAFESEH. D:\0\dcmtk-3.6.0-bin\dcmdata\apps\zlib_d.lib(inffast.obj)
error LNK1281: No se puede generar la imagen SAFESEH. D:\0\dcmtk-3.6.0-bin\dcmdata\apps\Debug\dcmdrle.exe	1
error LNK2026: módulo no seguro de una imagen SAFESEH. D:\0\dcmtk-3.6.0-bin\dcmjpls\apps\libtiff_d.lib(tif_version.obj)
error LNK2026: módulo no seguro de una imagen SAFESEH. D:\0\dcmtk-3.6.0-bin\dcmjpls\apps\libpng_d.lib(pngwtran.obj)
error LNK2026: módulo no seguro de una imagen SAFESEH. D:\0\dcmtk-3.6.0-bin\dcmpstat\apps\libxml2_d.lib(xpath.obj)
warning C4273: 'mktemp' : vinculación de DLL incoherente D:\0\dcmtk-3.6.0\dcmnet\apps\storescp.cc
LNK2026 is related to a non-secure module of a SAFESEH image.
When I check in Visual Studio MSDN I see that this LNK2026 error is thrown because a module (in my opinion all the third party libraries) was not compatible with the safe exception handling feature.
When I check /SAFESEH I see that it is only valid when linking for x86 targets. /SAFESEH is not supported for platforms that already have the exception handlers noted. For example, on x64 and Itanium.
But I was using Win32 target, i.e. x86! Is this happening because I have a 64 bits operative system?

When I don’t include any of the 3rd party libraries in CMake the Visual Studio compiling process finishes with no errors, just a warning:
warning C4273: ‘mktemp’ : incoherent DLL linkage.
And yet at the end of the compiling process for project ALL_BUILD an error dialog is thrown: The system cannot find the specified file.
But if I run the INSTALL project, all the required folders are generated
DCMTK/Bin, DCMTK/Etc , DCMTK/Include, DCMTK/Lib, DCMTK/Share
Are the 3rd party libraries compatible with W7 x64?
When I run the VS2012 project (made by Cmaje in x64 with 32 bit compiler) on a win7 32 bit system I get:

Code: Select all

error MSB6006: "cmd.exe" exited with code 3.	C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets
Should I do all the process(CMake+Visual Studio Compiling) in a 32 bit win 7?

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

Re: Installation problems on Win 7 64 bits

#2 Post by J. Riesmeier »

First of all, you should use the latest DCMTK snapshot and not the current release, which is more than 3.5 years old, because at that time there was no VS 2012 and no CMake 3.0. Then you should try to compile the source code on your W7 x64 system (64 bit compiler) without external libraries...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest