Visual Studio 2005标准版中的OpenMP [英] OpenMP in Visual Studio 2005 Standard

查看:120
本文介绍了Visual Studio 2005标准版中的OpenMP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将OpenMP和gcc一起用于编写并行代码.我现在正在使用Visual C ++ 2005,并试图弄清楚如何使用OpenMP.在属性"->"C/C ++/语言"菜单中有一个编译器选项,但随后它抱怨缺少该库.是否存在OpenMP的第三方实现,或者我只是错误地配置了Visual C ++?

I have used OpenMP with gcc for writing parallel code. I am now using Visual C++ 2005 and am trying to figure out how to use OpenMP. There is a compiler option in the Properties->C/C++/Language menu but then it complains the library is missing. Is there a 3rd party implementation for OpenMP or am i just configuring Visual C++ incorrectly?

推荐答案

经过研究,我发现Visual C ++ 2005或Visual C ++ Express Edition 2008不包含OpenMP库和dll.但是,通过一些解决方法,您可以使它工作.

After some research I found out that the OpenMP libs and dlls are not included with Visual C++ 2005 or Visual C++ Express Edition 2008. But with a few workarounds you can get it working.

首先,您需要从Microsoft下载lib文件,该文件可以在

First you need to download the lib files from microsoft which can be found at the Windows SDK for Windows Server 2008 and .NET framework 3.5. After you download it you need to make sure that either vcomp.lib or vcompd.lib is being linked to your program.

接下来,您需要具有

Next you need to have the dll which can be found in the Visual C++ Redistributable Packkage. Then make sure that vcomp90.dll is somewhere in your path.

还需要启用OpenMP编译器选项,可以在Visual C ++的属性"->"C/C ++/语言"菜单中找到该选项.

You also need to have the OpenMP compiler option enabled which can be found in the Properties->C/C++/Language menu of Visual C++.

之后,您应该可以使用OpenMP了.

After that you should be able to use OpenMP just fine.

这篇关于Visual Studio 2005标准版中的OpenMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆