I have trouble making Clang work with MinGW on Windows. I have MinGW-W64-builds-4.3.3 installed (GCC 7.2.0) as well as the newest Clang/LLVM (by installer on the website).
I am compiling with:
-target x86_64-pc-windows-gnu
option and Clang finds all the headers. Unfortunately there is an error from the linker when I am using OpenMP. It looks like this:
: undefined reference to `__imp___kmpc_fork_call'
\libgomp.a(team.o):(.text+0x19): undefined reference to `pthread_mutex_destroy'
...
When I try to use -fopenmp=libomp flag I am getting errors like this:
...: undefined reference to `__imp___kmpc_fork_call'
...: undefined reference to `__imp___kmpc_for_static_init_4'
...: undefined reference to `__imp___kmpc_for_static_fini'
...: undefined reference to `__imp___kmpc_barrier'
...
It all works without problems when compiling with GCC. Is there a way to make it (openmp) work without Visual Studio installed? If no, is there some minimilastic Visual Studio installer which just pulls needed libraries/headers and not the whole IDE etc.?
I surely don't know what I am doing here. Explain like I am five answers are very appreciated.