Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Macro Values

Kathy_S_
Beginner
746 Views

How can I find the values for macro names in my Visual Studio 10 project that contains only Fortran code?  My C++ projects provide a way to view the values for all macros from the Properties window.  For example, it will show the value for $(TargetDir).  How do I find out the values for Macros in my Fortran VS10 project?

We are using Windows 7, Visual Studio 10, and Intel Parallel Studio XE 2015 Composer Edition for Fortran Windows.

 

0 Kudos
4 Replies
Steven_L_Intel1
Employee
746 Views

C++ uses a very different project system than Intel Fortran does (this may change in the future.) There isn't a single place for this, but all of these values are derived from project settings. $(TargetDir), for example, comes from General > Output Directory.

What problem are you trying to solve?

0 Kudos
Kathy_S_
Beginner
746 Views

Hello Steve,

 

Thanks for responding, this was more of a general question than anything else.  I recently resolved an issue with a multi-project solution and had difficulties discerning values for macro variables.  It took more time than expected, as these values were unclear.  Isn’t there any way to look at the values of all macro variables for an Intel Fortran application in VS10?

 

0 Kudos
FortranFan
Honored Contributor II
746 Views

Kathy S. wrote:

.. this was more of a general question than anything else.  I recently resolved an issue with a multi-project solution and had difficulties discerning values for macro variables.  It took more time than expected, as these values were unclear.  Isn’t there any way to look at the values of all macro variables for an Intel Fortran application in VS10?

@Kathy,

Someone from Intel can correct me if I'm wrong, but as far as I can tell, the integration of Intel Fortran with Visual Studio (VS) does not in any way change, delete, or add to the build command and property macros that Microsoft provides for a particular VS version.  You would know to look up the macros that come with your VS version either in Help or using another project such as C++ or online at MSDN (see the the link below):

https://msdn.microsoft.com/en-us/library/c02as0cs(v=vs.100).aspx

I have not had any problems with using any of Microsoft-provided VS macros in any of my Intel Fortran projects,  Note Microsoft itself can change some of the macros in a newer VS version compared to an older one and you have to sort out the differences in your projects either by yourself or with any of the conversion utilities from Microsoft, 3rd party, etc.  But that is independent of Intel Fortran, 

0 Kudos
Zhao__Wiley
Beginner
746 Views

I don't think the above replies answered the original question.  I am still confused about the value of visual fortran build macros.  The link here lists the macros:

https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-developer-guide-and-reference/top/compiler-setup/using-microsoft-visual-studio-windows/supported-build-macros.html

If the project is C/C++, there is a "Macros" button under project "Properties"->"Configuration Properties"->"General"->click on "Output Directory" value->"Edit".  Pressing the button will list all macros and their values.

But if the project is Visual Fortran, the "Macros" button is missing. How can I see the values of these macros? They are project specific. For example, $(ProjectDir) seems to be the directory where the source code (xxx.F) is. For a multi-project solution inherited from someone else, it is very helpful to know these macros value to maintain the code.

0 Kudos
Reply