I built VTK-8.0.0
(using msvc2017_64
) and ITK-4.12.0
(using msvc2017_64
). During the ITK-build as below:
1) building VTK (CMake3.9.0
)
2) building ITK (CMake3.9.0): Module_ITKVtkGlue
+ VTK_DIR this path C:\VTK\8.0.0\build\msvc2017_64
3) Compiling VTK using msvc2017 (in Release mode)
4) Create a new environment variable VTK_DIR
with the value C:\VTK\8.0.0\build\msvc2017_64
5) Add to the path: %VTK_DIR%\bin\Release
6) Compiling ITK using msvc2017 (in Release mode)
7) Creating a new environment variable ITK_DIR
with the value C:\ITK\4.12.0\build\msvc2017_64
8) Add to the path: %ITK_DIR%\bin\Release
And now, I only want to build and compile a very simple project from the link below: https://itk.org/Wiki/ITK/Examples/IO/ImageToVTKImageFilter
however, I can't configure the project getting the error below in CMake:
***************************************************************
CMake Error at C:/ITK/4.12.0/build/msvc2017_64/lib/cmake/ITK-4.12/Modules/ITKVtkGlue.cmake:14 (set):
Syntax error in cmake code at
C:/ITK/4.12.0/build/msvc2017_64/lib/cmake/ITK-4.12/Modules/ITKVtkGlue.cmake:14
when parsing string
C:\VTK\8.0.0\build\msvc2017_64
Invalid escape sequence \V
Call Stack (most recent call first):
C:/ITK/4.12.0/src/CMake/ITKModuleAPI.cmake:54 (include)
C:/ITK/4.12.0/src/CMake/ITKModuleAPI.cmake:26 (itk_module_load)
C:/ITK/4.12.0/src/CMake/ITKModuleAPI.cmake:84 (_itk_module_config_recurse)
C:/ITK/4.12.0/build/msvc2017_64/ITKConfig.cmake:74 (itk_module_config)
CMakeLists.txt:6 (find_package)
Configuring incomplete, errors occurred!
See also "C:/new_dev/tests/ImageToVTKImageFilter/build/CMakeFiles/CMakeOutput.log".
***************************************************************
To solve this problem, at first, I tried to add an Entry with ItkVtkGlue
path but the same error was achieved. Then, I created ItkVtkGlue.lib
individually and added added a new environment variable ItkVtkGlue_DIR
with the value C:\ItkVtkGlue\build\Release
and also added to the path and again creating an Entry for ItkVtkGlue
, but I got the same error.
I would appreciate any help... Deeply looking forward to your advice ...
Create a new environment variable VTK_DIR with the value 'C:\VTK\8.0.0\build\msvc2017_64'
- When set path variables for CMake, do not use backslash in them, use forward slash instead:C:/VTK/8.0.0/build/msvc2017_64
. – Tsyvarev/ITK/4.12.0/build/msvc2017_64/lib/cmake/ITK-4.12/Modules/ITKVtkGlue.cmake
is not an error log. This is a normal file, but its content depends on your machine (more precise, it depends on installation of VTK). – Tsyvarev