Pages

Configuring Visual Studio for Mixed-Language Applications

Jumat, 03 Juni 2011


Introduction

If your application mixes Fortran with C or C++ and the main program is not in Fortran, you must configure Microsoft Visual Studio to search Fortran libraries.  This article describes the process. Visual Studio 2008 is used in the illustrations.  The process is similar Visual Studio 2005 and Visual Studio.NET 2003, with the exception that Visual Studio .NET 2003 supports development for the "Win32" platform (IA-32 architecture) only.
For Visual Studio 2010, please see the section below for Configuring Microsoft Visual Studio 2010
This article applies to Intel Visual Fortran 10.x and 11.x, and Intel Visual Fortran Composer XE 2011. (Intel Visual Fortran Composer XE does not support Visual Studio 2003.)
Configuring Microsoft Visual Studio 2003, 2005 or 2008

This configuration needs to be done one time only per install of Microsoft Visual Studio.
Open Microsoft Visual Studio.  Select Tools > Options. In the left pane, expand Projects and Solutions,  click on VC++ Directories. (Visual Studio .NET 2003 uses "Projects" instead of "Projects and Solutions") and then select "Library Files" for "Show directories for".
Setting%20directory%20lists%20in%20Visual%20Fortran
Click on the New Line button (to the right of the "check mark" button) and enter the following new line if you are using Intel Visual Fortran Composer XE 2011:
$(IFORT_COMPILER12)compiler\lib\ia32
or the following new line if you are using Intel Visual Fortran 11.x:
$(IFORT_COMPILER11)lib\ia32
or the following new line if you are using Intel Visual Fortran 10.x:
$(IFORT_COMPILER10)\ia32\lib
Click OK.
If you are using Visual Studio 2005 or 2008 and will be developing for the Intel 64 or IA-64 architectures, repeat the above steps, using the Platform dropdown to select "x64" (Intel 64) or "Itanium" (IA-64). When entering the path, use "intel64" or "ia64" instead of "ia32".
Additional Notes
If you are using Visual Studio 2005, you must install Visual Studio 2005 Service Pack 1, otherwise your Fortran project will not be found when linking the C/C++ project.

This section is applicable to Intel Visual Fortran Composer XE 2011 only.
  1. In Visual Studio, with a solution open that contains a C++ project, select View > Property Manager. If you do not see Property Manager under the View menu, you will find it under View > Additional Windows. The Property Manager window will appear. Note that this is not Properties Window or Properties Pages.
  2. Click on the triangles or + signs to expand the property tree under the Debug|Win32 configuration
  3. Double click on Microsoft.Cpp.Win32.user
  4. Select VC++ Directories
  5. Click in the field to the right of "Library Directories"
  6. Click the triangle that appears to the right and select <Edit...>
  7. Click the New Line button or press Ctrl-Insert
  8. In the new field that appears, type:
    $(IFORT_COMPILER12)\compiler\lib\ia32
  9. Click OK, OK
  10. In the Visual Studio toolbar, select File > Save All
If you will be building Intel® 64 (x64) configurations:
  1. Back in the Property Manager, expand the Debug|x64 configuration
  2. Double click on Microsoft.Cpp.x64.user
  3. Select VC++ Directories
  4. Click in the field to the right of "Library Directories"
  5. Click the triangle that appears to the right and select <Edit...>
  6. Click the New Line button or press Ctrl-Insert
  7. In the new field that appears, type:
    $(IFORT_COMPILER12)\compiler\lib\intel64
  8. Click OK, OK
  9. In the Visual Studio toolbar, select File > Save All
Click on the Solution Explorer tab, or press Ctrl-Alt-L, to make it visible again.
If you do not see the Microsoft.Cpp.x64.user property page listed for the x64 configuration, right
click on Debug|x64 and select Add Existing property Sheet. Browse to the location which
contains the MsBuild 4.0 property pages. On Windows XP, this is typically:

C:\Documents and Settings\<username>\Local Settings\Application Data\Microsoft\MSBuild\v4.0
On Windows Vista and Windows 7, it is typically:
C:\Users\<username>\Local Settings\AppData\Local\Microsoft\MSBuild\v4.0
You may need to enable viewing of hidden files and folders to see these paths.
Select Microsoft.Cpp.x64.user.props and click Open. Now follow the steps above.

03 Jun, 2011


--
Source: http://software.intel.com/en-us/articles/configuring-visual-studio-for-mixed-language-applications/
~

0 komentar:

Poskan Komentar

Ayo gan Komentarnya jangan lupa,,,biar tambah semangat yang upload Film dan Game dan berita juga update artikelnya, kalau ada link yang mati laporkan juga disini ya...

 
gamers holic dan security web dan aneka ragam © 2011 | Designed by Bingo Cash, in collaboration with Modern Warfare 3, VPS Hosting and Compare Web Hosting
Related Posts Plugin for WordPress, Blogger...