matplotplusplus: cimg_display error when compiling from source

Hi, Thank you for sharing this great project. I am attempting to compile matplot++ from source, however, I have faced some error as follows clang: error: no such file or directory: 'cimg_display=0'

Operating System: Ubuntu 18.04 CMake Version: 3.18 Clang: clang++10 The following is CMake terminal output.

CMAKE_MODULE_PATH=/home/user/develop/libraries/matplotplusplus/cmake
-- CPM: adding package nodesoup@0.1 (4bcd8cd2d6c963ccf053f8c19dbb63c065467527)
-- CPM: adding package cimg@0.221 (v.221)
JPEG Found
TIFF Found
ZLIB Found
PNG Found
-- A library with LAPACK API found.
LAPACK Found
BLAS Found
FFTW Found
OPENEXR Found
-- Checking for module 'Magick++'
--   Found Magick++, version 6.9.7
MAGICK Found
-- CPM: adding package glad@0.1.33 (df8e9e16110b305479a875399cee13daa0ccadd9)
-- CPM: adding package glfw@3.3.2 (3.3.2)
-- Using X11 for window creation
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/develop/libraries/matplotplusplus/build

May I know how can I edit the setting to compile successfully?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Glad to report Build finished with exit code 0 on Ubuntu 20.04 😃

Steps taken:

  1. Remove the offending line in https://github.com/alandefreitas/matplotplusplus/issues/1#issuecomment-683260005
  2. Add all the missing include directives, see #5
  3. Replace all occurrences of isfinite by std::isfinite
  4. Link Xrandr libs, see #6
  5. Replace the whole line mentioned in #4 by size_t pipe_capacity = BUFSIZ; (disclaimer: temporary workaround)
  6. Install the following apt packages:
gnuplot
libblas-dev
libegl-dev
libfftw3-dev
libglfw3-dev
libglx-dev
libjpeg-dev
liblapack-dev
libmagick++-dev
libopenexr-dev
libopengl-dev
libpng-dev
libtiff-dev
libx11-dev
libxcursor-dev
libxi-dev
libxinerama-dev
libxrandr-dev
  1. Build with -fpermissive and ignore all the various compiler warnings for now 😉
  2. Enjoy the examples!