Open AXIHIXA opened 1 year ago
I am also experiencing this issue.
I was able to solve the problem by using
-BUILD_SHARED_LIBS=ON \
instead of -DMATPLOTPP_BUILD_SHARED_LIBS=ON \
Looks like the following line is causing the issue: https://github.com/alandefreitas/matplotplusplus/blob/7b757c063ae347bb7f945cb6dacb713418464746/CMakeLists.txt#L43
Maybe should be
option(MATPLOTPP_BUILD_SHARED_LIBS "Build shared libraries" OFF)
@alandefreitas is this an actual issue that needs to be fixed or is the current behavior desired?
Probably yes. It's related to this PR: https://github.com/alandefreitas/matplotplusplus/pull/323
Although option(MATPLOTPP_BUILD_SHARED_LIBS "Build shared libraries" ${BUILD_SHARED_LIBS})
is correct. It lets the user customize it but also inherits the default behavior from the global CMake option.
The problem is that the std::filesystem
interface target is not being installed in that CMake execution path. We could fix that or... since this is a C++17 library we could get rid of this target and stop supporting compilers that still don't have native std::filesystem
support.
This target exists because most compilers back then supported C++17 language features but had not implemented std::filesystem
yet.
Hi there, first of all, thanks so much for this awesome repo.
Bug category
Describe the bug Does not compile when linking against Matplot++:
Steps to Reproduce Built with the latest release with the following commands:
Sample project (CMakeLists.txt) linking against Matplot++:
Output Does not compile, no output.
Platform
Environment Details:
Additional context g++11 does not require a manual link against the filesystem module (it is linked automatically). E.g., the following code compiles and runs correctly on my side:
without the need for CMake commands in the link_libraries family.