I’m creating a C++ application that can read images and display/render them.
Adding the this header #include <vtk-9.3/vtkImageReader2.h> on one of my hpp file generates the following error:

/usr/local/include/vtk-9.3/vtksys/SystemTools.hxx:6:10: fatal error: vtksys/Configure.hxx: No such file or directory
    6 | #include <vtksys/Configure.hxx>

what is this Configure.hxx file? how to fix that?

Thanks in advance!

You’re missing VTK’s include directories. You should have them set up via CMake and, failing that, your code needs to have #include <vtkImageReader2.h> and the vtk-9.3 part provided via -I.

Provided that you are using CMake, you can do something along the lines of

cmake_minimum_required(VERSION 3.8)


  # other packages that you need
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE 

Many thanks for your reply!

I’m completely lost now with VTK, I dont know what I’m missing here. I know in the past it was not easy to setup.
I have built this time VTK8 instead of VTK9 for future dev with Qt library and I used CMake gui version.
I’m developing on a Linux machine and I’m using vscode as IDE.
I included all necessary headers, well part of them, in tasks.json file

				/* VTK includes */

All these includes seems laborious and the compilation still complain about missing header such as:

/home/massilinux/VTK8/build/Utilities/KWIML/vtk_kwiml.h:19:10: fatal error: vtkkwiml/abi.h: No such file or directory
   19 | #include "vtkkwiml/abi.h"

I dont know why this header for reading just a PNG file. Any thoughts?

If I were you, I would simply clone the ImageViewer in the Examples/GUI/Qt directory. Check if this works with your Qt installation. The examples are self-contained and search for VTK and Qt. Remember that the Qt directory should be the lib/cmake/vtk-8 folder of your Qt build or your Qt installation.

I would also suggest that you install VTK before using it; you should only need a handful of include paths, not one per module.

KWIML is used to know what 64bit types (long, long long, __int64) are available.

Thanks for your reply,
This is my c_cpp_properties file

    "configurations": [
            "name": "Linux",
            "includePath": [
            "defines": [
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "linux-clang-x64"
    "version": 4

Is it enough ? because I’m still getting this error now:

/home/massilinux/Desktop/Project/ImageReader/ImageRead.hpp:18:10: fatal error: vtkImageReader2.h: No such file or directory
   18 | #include <vtkImageReader2.h>

here is my code where the error occurs

/// @headerfile External headers
#include <vtkImageReader2.h>

/// @brief 
namespace IMG
/// @brief 
/// @tparam T 
template < typename T = vtkImageReader2 >
class ImageRead : public IReader
    /// @brief 
    /// @brief 
    ~ImageRead() = default;
    /// @brief 
    /// @param filepath 
    /// @return 
    auto setFileName(const char * filepath) -> void override;
    /// @brief 
    auto display() -> void override;
    /// @brief 
    /// @return 
    vtkAlgorithmOutput *getOutput() const override;
    std::unique_ptr<T> mptr {nullptr};
} // namespace IMG

It’ll fail if vtkImageReader2’s module is not enabled (IO/Image).

I would really suggest that you use CMake. It will add the necessary include directories (they are many) both for VTK and Qt.