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.
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
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
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