Closed vlocateli closed 3 months ago
Weird. Isn't because the MinGW compiler is interpreting \openmp
and \O2
as files?
c++.exe: warning: /openmp: linker input file unused because linking not done
c++.exe: warning: /O2: linker input file unused because linking not done
Should be:
-fopenmp
-O2
@anderskaestner
I think I know why it's failing, in Actions webpage, if you see Actions Workflow file, the Windows compiler is set to cl
but the errors show MinGW being used...
-- The CXX compiler identification is GNU 12.2.0
[...]
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
The problem is using cl
(Microsoft's Visual C++ Compiler) with GCC flags. That's why it fails. :) @anderskaestner
@damskii9992 Could you change the Windows compiler to MinGW in the workflow file? :)
@damskii9992 Could you change the Windows compiler to MinGW in the workflow file? :)
I'd prefer adapting the compile arguments for msvc. But, good that you found the cause of the problem.
@damskii9992 Could you change the Windows compiler to MinGW in the workflow file? :)
I'd prefer adapting the compile arguments for msvc. But, good that you found the cause of the problem.
The problem is that MSVC uses an old version of OpenMP library from 2002. We can use the flags /openmp:llvm
to use LLVM runtime with MSVC, /openmp:experimental
is also an option. See: OpenMP support in MSVC
I'm actually about to replace the openmp code with std:thread based implementations. See thread pool. So openmp will anyway be phased out.
The broken Windows build seems to be due to visual studio changing how they version their software. I am currently looking into it.
Fixed build error, added
to class member to make it compiler-time constant.