openmp Linker flags in MSVC
when I try to compile my project in MSVC2008 with the linker flag (Configuration properties>>Linker>>Command line>> Additional options) set to : "/STACK:10000000 /machine:x64 /openmp" it warns me that the /openmp flag is unknown. "LINK : warning LNK4044: unrecognized option '/openmp'; ignored" I want to know that MSVC automatically links the openmp libs when I added the co开发者_运维问答mpiler flag (Configuration properties>>C/C++>>Command line>>Additional options) " /Zm1000 /EHs /MP /openmp /fp:fast" or I should do sth else for getting rid of the warning.
The /openmp
switch should be applied to the compiler, not linker. You can switch it on in C/C++ -> Language -> Open MP Support
. The compiler then automatically instructs the linker to include the corresponding libraries.
精彩评论