MINGW-packages: Linker doesn't find libraries

I am unable to build my project using msys2 and mingw64. I am using Github Action CI. The build with ubuntu-linux-gcc on arrmv6 and x86_64 works flawlessly.

My issue is, that the linker won’t link my dependencies:

[100%] Linking CXX executable game.exe
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lglew32
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lglfw3
collect2.exe: error: ld returned 1 exit status

I am installing the following packages:

  • mingw-w64-x86_64-cmake
  • mingw-w64-x86_64-make
  • mingw-w64-x86_64-glew
  • mingw-w64-x86_64-glfw
  • mingw-w64-x86_64-glm
  • mingw-w64-x86_64-z3

Then I make my project with cmake -G "MinGW Makefiles" mingw32-make I also tried make instead of mingw32-make, but it made no difference.

My Project is here: C0D3-M4513R/OpenGLGame And my workflow file is here

The build Logs are attached: 1_build-win[1].txt 1_build-linux_(ubuntu-latest,_armv7,_gcc,_gcc)[1].txt 2_build-linux_(ubuntu-latest,_x86_64,_gcc,_gcc)[1].txt

Is this an issue, of how I am building/using msys2, or is this a github action thing, or is there actually an issue with a mingw package?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 27 (14 by maintainers)

Most upvoted comments

or -G "MSYS Makefiles"

[100%] Linking CXX executable game.exe C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.1.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find -lglew32 C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.1.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find -lglfw3 collect2.exe: error: ld returned 1 exit status

The paths shown here are wrong and doesn’t belong to MSYS2.