English 中文(简体)
OpenMP in Visual C++ 2008 Standard Edition
原标题:

How can I get OpenMP set up in VC++ 2008? The compiler supports it, I believe I am only missing headers/libs. Can I obtain them similar to how the framework SDK can be added to VC++ Express for MFC development?

问题回答

You need to enable OpenMP support in the C++ project properties (this is a compiler option).

You also need to #include <omp.h> in any source file where you are using OpenMP pragmas and/or library calls. This bit me, as the documentation says the include is only needed when making library calls, but not for using pragmas alone. But the documentation is wrong. The omp.h header updates the manifest of your executable so the run-time library can be found (vcomp.dll).

Afaik, only professional editions come with OpenMP.

An alternative is to use Cygwin and download the c/c++ development packages (gcc 4.2 is the default i think and it ll have OpenMP supported)

The Windows SDK and WDK have traditionally come with the C/C++ compilers for the various platforms. These compilers often have features enabled that do not come with the express versions of VS.

Two such features used to be included:

  • Support for OpenMP
  • Support for PREfast

(I say all this in the past tense because it s been awhile since I ve installed a Windows DK.)

So it s easy enough to get the compiler for free. The trick will then be to replace VS s cl with the appropriate one from the dev kit.





相关问题
How to speed up Visual Studio 2008? Add more resources?

I m using Visual Studio 2008 (with the latest service pack) I also have ReSharper 4.5 installed. ReSharper Code analysis/ scan is turned off. OS: Windows 7 Enterprise Edition It takes me a long time ...

Trouble with VS.PHP installing it s own Apache server

I tried installing VS.PHP some time ago. I was intent on seeing how it works with my current setup. I immediately encountered trouble: none of my sites wanted to render. On windows, I m using WAMP ...

Jquery and Intellisense in VS 2008 with hotfix and SP1

I followed Scott Guthrie s instructions as outlined at http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx but no avail: intellisense still doesn t work. Any tips?

Fixing "error C2065: undeclared identifier"

First off, I m completely out of my depth here. So the question might be the wrong one to ask, but here goes... As per the accepted answer to this question, I m trying to compile the bindings for the ...

View whitespace in VS2008

After Jeph most recent post: http://www.codinghorror.com/blog/archives/001310.html, I thought to myself it would be fun to see if any of my code has those trailing whitespaces. So I open Visual ...

热门标签