That doesn't change the result on Windows.<span></span><div><br>On Tuesday, August 11, 2015, Bataev, Alexey via Openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org">openmp-dev@lists.llvm.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Johnny,<br>
try to use -fopenmp=libomp. Currently -fopenmp does not turn on OpenMP support.<br>
<br>
Best regards,<br>
Alexey Bataev<br>
=============<br>
Software Engineer<br>
Intel Compiler Team<br>
<br>
10.08.2015 18:51, Peyton, Jonathan L via Openmp-dev пишет:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Clang front end developers,<br>
<br>
We are having trouble getting the -fopenmp flag to work on Windows. It appears that the linking phase does not include libomp.lib? Below is an OpenMP hello world compilation output.<br>
<br>
-- Johnny<br>
<br>
-----Original Message-----<br>
From: İsmail Dönmez [mailto:<a>ismail@i10z.com</a>]<br>
Sent: Monday, August 10, 2015 10:04 AM<br>
To: Peyton, Jonathan L<br>
Subject: Re: [Openmp-dev] libomp.lib is not automatically added on Windows<br>
<br>
Hi,<br>
<br>
On Mon, Aug 10, 2015 at 6:02 PM, Peyton, Jonathan L <<a>jonathan.l.peyton@intel.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you include -v in the compile command and post the output?<br>
</blockquote>
Sure:<br>
<br>
C:\Users\ismail\Desktop>clang -O2 -fms-compatibility-version=19 -fopenmp -v omp_hello.c clang version 3.8.0 (<a href="http://llvm.org/git/clang" target="_blank">http://llvm.org/git/clang</a><br>
45770fa6e4eb618277ed85044d5a2d4c962c57cf) (<a href="http://llvm.org/git/llvm" target="_blank">http://llvm.org/git/llvm</a><br>
97bdbf60d9923a9e06effbb96801129070499fd5)<br>
Target: x86_64-pc-windows-msvc<br>
Thread model: posix<br>
InstalledDir: C:\Program Files\LLVM\bin<br>
"C:\\Program Files\\LLVM\\bin\\clang.exe" -cc1 -triple<br>
x86_64-pc-windows-msvc19.0.0 -emit-obj -disable-free -main-file-name omp_hello.c -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v -dwarf-column-info -resource-dir "C:\\Program Files\\LLVM\\bin\\..\\lib\\clang\\3.8.0"<br>
-internal-isystem "C:\\Program<br>
Files\\LLVM\\bin\\..\\lib\\clang\\3.8.0\\include" -internal-isystem "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE"<br>
-internal-isystem "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\ATLMFC\\INCLUDE" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10150.0\\ucrt"<br>
-internal-isystem "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6\\include\\um" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\shared" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\um"<br>
-internal-isystem "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\winrt" -O2 -fdebug-compilation-dir "C:\\Users\\ismail\\Desktop" -ferror-limit 19 -fmessage-length 100 -fopenmp -fnoopenmp-use-tls -mstackrealign -fms-extensions -fms-compatibility -fms-compatibility-version=19 -fdelayed-template-parsing -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o "C:\\Users\\ismail\\AppData\\Local\\Temp\\omp_hello-45bdc2.o" -x c omp_hello.c clang -cc1 version 3.8.0 based upon LLVM 3.8.0svn default target x86_64-pc-windows-msvc #include "..." search starts here:<br>
#include <...> search starts here:<br>
C:\Program Files\LLVM\bin\..\lib\clang\3.8.0\include<br>
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um C:\Program Files (x86)\Windows Kits\8.1\include\shared C:\Program Files (x86)\Windows Kits\8.1\include\um C:\Program Files (x86)\Windows Kits\8.1\include\winrt End of search list.<br>
"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\link.exe" -out:a.exe -defaultlib:libcmt -nologo "C:\\Users\\ismail\\AppData\\Local\\Temp\\omp_hello-45bdc2.o"<br>
omp_hello-45bdc2.o : error LNK2019: unresolved external symbol __kmpc_fork_call referenced in function main omp_hello-45bdc2.o : error LNK2019: unresolved external symbol omp_get_thread_num referenced in function .omp_outlined.<br>
omp_hello-45bdc2.o : error LNK2019: unresolved external symbol omp_get_num_threads referenced in function .omp_outlined.<br>
omp_hello-45bdc2.o : error LNK2019: unresolved external symbol __kmpc_cancel_barrier referenced in function .omp_outlined.<br>
a.exe : fatal error LNK1120: 4 unresolved externals<br>
clang.exe: error: linker command failed with exit code 1120 (use -v to see invocation)<br>
<br>
C:\Users\ismail\Desktop><br>
_______________________________________________<br>
Openmp-dev mailing list<br>
<a>Openmp-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
</blockquote>
<br>
_______________________________________________<br>
Openmp-dev mailing list<br>
<a>Openmp-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
</blockquote></div>