dcmtk for x64 bit processor

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
ilia71
Posts: 22
Joined: Wed, 2016-10-19, 13:13

dcmtk for x64 bit processor

#1 Post by ilia71 »

Hello All,

How can i build this project for x64 OP ?

Thank you,

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

Re: dcmtk for x64 bit processor

#2 Post by J. Riesmeier »

What do you mean by that? The DCMTK can be compiled on various 64-bit operating systems, such as Linux and Windows. I would suggest that you use the current snapshot (from February this year).

What exactly is your problem?

ilia71
Posts: 22
Joined: Wed, 2016-10-19, 13:13

Re: dcmtk for x64 bit processor

#3 Post by ilia71 »

I used CMAKE to build the project for windows OP.
Afterwards i noticed that the output binaries are only for x32 system

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

Re: dcmtk for x64 bit processor

#4 Post by J. Riesmeier »

Did you select the correct CMake Generator, i.e. something with "Win64" in the name?

ilia71
Posts: 22
Joined: Wed, 2016-10-19, 13:13

Re: dcmtk for x64 bit processor

#5 Post by ilia71 »

Yes

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

Re: dcmtk for x64 bit processor

#6 Post by J. Riesmeier »

Do you use the current DCMTK snapshot?

ilia71
Posts: 22
Joined: Wed, 2016-10-19, 13:13

Re: dcmtk for x64 bit processor

#7 Post by ilia71 »

Yes. I used Dcmtk 3.6.0

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

Re: dcmtk for x64 bit processor

#8 Post by J. Riesmeier »

That's not the current snapshot but the latest release (which is more than 6 years old). Please use the current snapshot!

ilia71
Posts: 22
Joined: Wed, 2016-10-19, 13:13

Re: dcmtk for x64 bit processor

#9 Post by ilia71 »

I will try. Thank you

Kaan Yilmaz
Posts: 2
Joined: Wed, 2018-07-11, 14:04

Re: dcmtk for x64 bit processor

#10 Post by Kaan Yilmaz »

Hi,

I am beginner and I also can't build DCMTK for x64. I've got VS 2017, DCMTK 3.6.3, CMake 3.11.4 x64. All CMake flags containing MTd or MT are set to MDd and MD, respectively. There are some CMake flags whose values are /machine:x86 but chaning x86 to x64 didn't help either.

On Visual Studio 2017, prior to building the INSTALL.vcxproj, I can't select x64 as the solution platform. The only choice is win32.

Is there something I miss while building for x64?
I would really appreciate if someone helped me.

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: dcmtk for x64 bit processor

#11 Post by Jan Schlamelcher »

Did you choose the correct CMake Generator, i.e. Visual Studio 15 2017 Win64 and not just Visual Studio 15 2017? See https://cmake.org/cmake/help/latest/gen ... 02017.html .

Kaan Yilmaz
Posts: 2
Joined: Wed, 2018-07-11, 14:04

Re: dcmtk for x64 bit processor

#12 Post by Kaan Yilmaz »

Jan Schlamelcher wrote:Did you choose the correct CMake Generator, i.e. Visual Studio 15 2017 Win64 and not just Visual Studio 15 2017? See https://cmake.org/cmake/help/latest/gen ... 02017.html .
==SOLVED==

This solved the problem and I am sorry for my lack of attention. However, now, when I build INSTALL.vcxproj of config, it gives the following error:

Code: Select all

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------
1>Checking Build System

2>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------
2>Building Custom Rule D:/dcmtk-3.6.3/config/CMakeLists.txt
2>CMake does not need to re-run because C:/Users/kaany/source/repos/DCMTK/config/CMakeFiles/generate.stamp is up-to-date.
3>------ Build started: Project: INSTALL, Configuration: Debug x64 ------
3>-- Install configuration: "Debug"
3>CMake Error at docs/cmake_install.cmake:36 (file):
3>  file cannot create directory: C:/Program Files/DCMTK/share/doc/dcmtk.
3>  Maybe need administrative privileges.
3>Call Stack (most recent call first):
3>  cmake_install.cmake:37 (include)
3>
3>
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: C:\Users\kaany\OneDrive\Masaüstü\cmake-3.11.4-win64-x64\cmake-3.11.4-win64-x64\bin\cmake.exe -DBUILD_TYPE=Debug -P cmake_install.cmake
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 1.
3>Done building project "INSTALL.vcxproj" -- FAILED.
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I looked for a fix online but I couldn't find any. It would nice if someone came with a solution.

Edit: I solved the problem by changing the CMAKE_INSTALL_PREFIX to another folder in C drive and running VS2017 in admin mode.

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: dcmtk for x64 bit processor

#13 Post by Jan Schlamelcher »

Kaan Yilmaz wrote:Edit: I solved the problem by changing the CMAKE_INSTALL_PREFIX to another folder in C drive and running VS2017 in admin mode.
Yes, these are indeed the "solutions" Google will present you, as always, not really good ones. Changing CMAKE_INSTALL_PREFIX will affect several search paths inside DCMTK, so, if you install to a different location than C:\Program Files\ and move the files there later on, you might run into problems. Running Visual Studio with administrator privileges is also obviously not really a great option. The best I came up with some time ago is to manually run the install script, only overriding CMAKE_INSTALL_PREFIX during installation but not during configuration or build of the project. This is (as far as I know still) the way CPack handles it internally. You would for example do it like this:

Code: Select all

cmake.exe -DBUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=D:/dcmtk-3.6.3-install -P D:/dcmtk-3.6.3/cmake_install.cmake

Post Reply

Who is online

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