Section outline

      • Cimg.h: Download the "standard package" and include the file "CImg.h" in your project (this is the only file needed from the downloaded zip archive).
      • Drawing.zip: Include file "Drawing.h" in your project and link the object file generated from "Drawing.cpp" to your program (the easiest way is just to add "Drawing.cpp" to your source files, see the explanations in this file). File "Main.cpp" represents an example of a main program.
      • In "Eclipse" under Linux, select in "Project -> Properties -> C/C++ General -> Paths and Symbols -> Includes -> GNU C++ -> Include directories -> Add" the installation directories of "CImg.h" and "Drawing.h" and add in "Project -> Properties -> C/C++ General -> Paths and Symbols -> Libraries -> Add" the files "pthread" and "X11"  (enter each name in the text area and press "Okay"; then in "Paths and Symbols" both names should be listed).
      • In "Microsoft Visual Studio" , create a project of type "Win32 console application". Then select in "Project -> Properties -> Configuration Properties -> C/C++ -> General -> Additional Include Directories" the installation directories of "CImg.h" and "Drawing.h" and select option "Project -> Properties -> Configuration Properties -> C/C++ -> Precompiled Headers -> Do not use precompiled headers".
      • In Orwell Dev-C++, set in "Project -> Project Options -> Parameters -> Linker" the value "-lgdi32".
      • If you use macOS,  install XQuartz and configure in your development environment the include path /opt/X11/include (compiler option: "-I /opt/X11/include") and the library path /opt/X11/lib (linker option "-L /opt/X11/lib").
    • Integrated Development Environments

    This development environment is included in various Linux distributions, e.g., in Ubuntu as package "eclipse-cdt". However, it also can be installed under macOS and under MS Windows using MinGW-w64.

    This development environment is freely available for Microsoft Windows (install the workload "Desktop development with C++").

    Another free development environment for Microsoft Windows.

    In Microsoft Windows or macOS, you may also use a preconfigured virtual Machine running Debian GNU/Linux with the Eclipse C/C++ IDE (login as user "guest" with password "guest"; open a window by clicking the  "Terminal" icon and start the IDE with the shell command "eclipse-cpp &"). The CImg library is already installed; a corresponding sample project has been created in Eclipse.