DiligentEngine
DiligentEngine copied to clipboard
Error building using MinGW-x64
Hello. I'm currently trying to build Diligent using MinGW-x64 (see below for compiler versions)
gcc.exe (GCC) 13.2.0 g++.exe (GCC) 13.2.0
I generated the makefile using CMake, but when running "make" it fails halfway with this error
[ 49%] Linking CXX static library libDiligent-GraphicsTools.a [ 49%] Built target Diligent-GraphicsTools [ 49%] Combining libraries... C:\Apps\w64devkit\bin/ar.exe: *.obj: Invalid argument make[2]: *** [DiligentCore\CMakeFiles\DiligentCore-static.dir\build.make:98: DiligentCore/libDiligentCore.a] Error 1 make[2]: *** Deleting file 'DiligentCore/libDiligentCore.a' make[1]: *** [CMakeFiles\Makefile2:2188: DiligentCore/CMakeFiles/DiligentCore-static.dir/all] Error 2 make: *** [Makefile:155: all] Error 2
Any ideas?
Our build on CI uses gcc 12.2.0 and finishes successfully Which distribution do you use? We test with these
I'm using this one
https://github.com/skeeto/w64devkit
Apparently, it does not have the ar
utility.
Hmm I ran ar.exe from the provided command line and it seems to work. Would MSYS2 work for building Diligent?
You may try. There are too many distributions for us to try them all. Note that MinGW is really not a recommended way to build the engine.
Yes, thank you. I saw in the readme that MinGW was not recommended. I just prefer MinGW over MSVC/Visual Studio for Windows. Looks like using the distribution you recommended fixed my problem though!