dgobbi / vtk-dicom

A set of classes for using DICOM in VTK.
BSD 3-Clause "New" or "Revised" License
259 stars 94 forks source link

Win10 CMake Build Failed~ (Help needed~!!!) #224

Closed Flowergift closed 11 months ago

Flowergift commented 11 months ago

Help needed~

Build error~

"

for CMake 3, add VERSION (X.Y.Z -> Changed "3.22.2") to set the version here

project(DICOM -> Changed "vtk-dicom" and not changed as "DICOM")

CMake version requirements

cmake_minimum_required(VERSION 3.12) " And "

CMake version requirements

cmake_minimum_required(VERSION 3.12)

for CMake 3, add VERSION (X.Y.Z -> Changed "3.22.2") to set the version here

project(DICOM -> Changed "vtk-dicom") "

changed to this sequence. But still build failed.

And tried to another vtk-dicom (https://salsa.debian.org/med-team/vtk-dicom) (https://dgobbi.github.io/vtk-dicom/doc/api/installation.html) but failed.

log file is like below. help me!!!!! what should I do???!!! Or is there any other CMake "VTKDICOM_DIR" (?) setting?

P.S : I did not installed GDCM. Is it essential to pre-install?

======================================================================================= CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers. Use -Wno-dev to suppress it.

Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631. The C compiler identification is MSVC 19.37.32826.1 The CXX compiler identification is MSVC 19.37.32826.1 Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/HostX64/x64/cl.exe - skipped Detecting C compile features Detecting C compile features - done Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/HostX64/x64/cl.exe - skipped Detecting CXX compile features Detecting CXX compile features - done CMake Error: File /vtkDICOMConfig.h.in does not exist. CMake Error at CMakeLists.txt:32 (configure_file): configure_file Problem configuring file

CMake Error: File /vtkDICOMBuild.h.in does not exist. CMake Error at CMakeLists.txt:34 (configure_file): configure_file Problem configuring file

CMake Error: File /vtkDICOMModule.h.in does not exist. CMake Error at CMakeLists.txt:235 (configure_file): configure_file Problem configuring file

CMake Error at CMakeLists.txt:470 (install): install FILES given no DESTINATION!

CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 3.22) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. Configuring incomplete, errors occurred! See also "C:/Users/User/source/vtk_dicom/CMakeFiles/CMakeOutput.log".

dgobbi commented 11 months ago

I don't understand what you changed in the CMakeLists.txt, or why you changed it. Can you attach the new file?

GDCM is not necessary.

Flowergift commented 11 months ago

I don't understand what you changed in the CMakeLists.txt, or why you changed it. Can you attach the new file?

GDCM is not necessary.

Why? Well.. Build error occured~ Plz refer the =========================== below error log file.

dgobbi commented 11 months ago

I saw the error log, it says there are several things wrong with the CMakeLists.txt. So to help you, I need to see your CMakeLists.txt.

Flowergift commented 11 months ago

The CMakeLists.txt fie....??? I even did not touched or modified at all. I don't know which "CMakeLists.txt" file I should give you. I upload TOTAL ALL files to .zip. Help me~~~ I've tried your code build by CMake GUI ver 3.22.6. And CMake Build paths are... C:/Users/User/source/vtk-dicom/Source C:/Users/User/source/vtk-dicom/Build

vtk-dicom.zip

image

And with no options with VS2022.

image

My try is JUST tested Asclepios viewer with your vtk-dicom libs/header files. And the correctly added your vtk-dicom source path to VS2022 "C/C++ => General => Additional Include Directories ". Well.. If some header files (vtkDICOMReader.h vtkDICOMTag.h vtkDICOMModule.h) are linked well, the vtk-DICOM CMake is not needed. (I'm not sure...)

dgobbi commented 11 months ago

I think you are running cmake on the wrong directory.

The correct one is vtk-dicom/CMakeLists.txt, but maybe you are running cmake on vtk-dicom/Source/CMakeLists.txt by accident.