alandefreitas / matplotplusplus

Matplot++: A C++ Graphics Library for Data Visualization 📊🗾
https://alandefreitas.github.io/matplotplusplus/
MIT License
4.09k stars 309 forks source link

MinGW Compiler Error using CMake. #336

Open Areshkew opened 1 year ago

Areshkew commented 1 year ago

Bug category

Describe the bug Can't build the project.

Steps to Reproduce

cmake -B

Output

```console [1/2] Building CXX object CMakeFiles/VND_VRP.dir/main.cpp.obj [2/2] Linking CXX executable VND_VRP.exe FAILED: VND_VRP.exe cmd.exe /C "cd . && C:\PROGRA~1\JETBRA~1\CLION2~1.2\bin\mingw\bin\G__~1.EXE -g CMakeFiles/VND_VRP.dir/main.cpp.obj -o VND_VRP.exe -Wl,--out-implib,libVND_VRP.dll.a -Wl,--major-image-version,0,--minor-image-version,0 src/libNode.a src/libVRP.a src/libVehicle.a src/libRoute.a "C:/Program Files (x86)/Matplot++/lib/libmatplot.lib" -lgdi32 "C:/Program Files (x86)/Matplot++/lib/Matplot++/libnodesoup.a" -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." undefined reference to `matplot::network::marker_size(float)' undefined reference to `matplot::network::x_data undefined reference to `matplot::network::y_data ... ```

Platform

Environment Details:

Additional context

cmake_minimum_required(VERSION 3.20)

project( VND_VRP )

add_subdirectory(src)

add_executable(VND_VRP main.cpp)

find_package(Matplot++ REQUIRED)

target_link_libraries(VND_VRP Node VRP Vehicle Route Matplot++::matplot)

__cplusplus = 201703 (c++ 17)

baiqinglun commented 1 year ago

I'm having the same issue

baiqinglun commented 1 year ago

vs2022 can be compiled successfully, but MinGW unsuccessfully