Replies: 1 comment 2 replies
-
What is "support for Make-based systems"? CMake generates Make solutions and people use it all the time via the "-G Makefile" option. But even if you do that, I don't even see you using Make in your example: you're 1) using cmake and letting it use whatever generator it wants for for the configure/build/install steps, and then 2) compiling code from the command line for some reason (bad practice for any reasonably sized project). Beyond that, I think you might be coming up with an arbitrary criterion that would eliminate almost all C++ libraries from consideration. With the exception of header-only libraries that actually make sense as header only, almost no C++ package has the explicit purpose of making it easy to use without a build system or a package manager. Even header-only libraries are annoying because you'd have to remember the include paths and pass each of them in the command line. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
after quite some struggle I managed to install matplotplusplus on a Linux system (running Ubuntu, but that shouldn't matter here) such that it integrates with a make-based environment. I used
Matplotplusplus> git clone [email protected]:alandefreitas/matplotplusplus.git
Matplotplusplus> cd matplotplusplus/
matplotplusplus> mkdir build
matplotplusplus> cd build/
build> cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O2" -DCMAKE_LIBRARY_PATH="/usr/local/lib/gcc/x86_64-pc-linux-gnu/lib64" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--verbose -lgcc_s" -DCMAKE_INSTALL_PREFIX=/opt/matplotpp -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_INCLUDEDIR=include
build> sudo -E env "PATH=$PATH" "LIBRARY_PATH=$LIBRARY_PATH" cmake --build . --parallel 6 --config Release
build> sudo cmake --install .
The LIBRARY_PATH comes from the installation of gcc (version 14.2), and via verbosity I checked for linking-problems.
Compilation of the test program
Matplotplusplus> cat test_matplot.cpp
#include <matplot/matplot.h>
int main() { matplot::plot({1,2,3}); matplot::show(); }
succeeded via
Matplotplusplus> g++ test_matplot.cpp -o test_matplot -I/opt/matplotpp/include -L/opt/matplotpp/lib -lmatplot -lpng -ljpeg -lz /opt/matplotpp/lib/Matplot++/libnodesoup.a
Any comments welcome (if something can be improved).
But now I wonder whether I should really invest into matplotplusplus, given that perhaps there might be bigger problems in the future? I can live with the above, and I don't know whether it could get worse, but I thought I better ask whether say a minimum level of support for make-based systems (not using cmake, other than for installing the software) would be possible? Basically just awareness of possible issues, and not making unnecessary trouble?
Best
Oliver
Beta Was this translation helpful? Give feedback.
All reactions