Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinGW Compiler Error using CMake. #336

Open
1 of 7 tasks
Areshkew opened this issue Apr 29, 2023 · 2 comments
Open
1 of 7 tasks

MinGW Compiler Error using CMake. #336

Areshkew opened this issue Apr 29, 2023 · 2 comments
Labels
bug - compilation error Something isn't working cross-platform issue - windows Help wanted - Good for contributing if you are on windows

Comments

@Areshkew
Copy link

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug
Can't build the project.

Steps to Reproduce

cmake -B

Output

[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

  • cross-platform issue - linux
  • [x ] cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: Windows 11
  • OS Version:
  • Compiler: MinGW
  • Compiler version: w64 9.0

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)

@github-actions github-actions bot added bug - compilation error Something isn't working cross-platform issue - windows Help wanted - Good for contributing if you are on windows labels Apr 29, 2023
@baiqinglun
Copy link

I'm having the same issue

@baiqinglun
Copy link

vs2022 can be compiled successfully, but MinGW unsuccessfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - compilation error Something isn't working cross-platform issue - windows Help wanted - Good for contributing if you are on windows
Projects
None yet
Development

No branches or pull requests

2 participants