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

Integer, Parameter variables undefined in Fortran subroutines called from C++ in Debug

Ashley_Weinstein
Beginner
345 Views

I have code in which a C++ main program passes information across an interface to Fortran source (a collection of subroutines). During debugging, all INTEGER, PARAMETER :: X=Y variables within the Fortran source are undefined. Is there some sort of option that I need to flag to get these variables initialized properly?? The Fortran source was working just fine as a standalone project before I coded the C++ calling interface.

I am using VS 2008 with VC++2008 and IVF2011.

EDIT: I came across the field "Information for PARAMETER Constants" option under the Fortran -> Debugging section. It was set to "None". I changed the option to "All" and this resolved the issue. A minor issue but I'm sure newcomers to more recent versions of VS will run into this same problem. You would think that something like this would by default be set to "All" or at the very least set to "Used in the program".

0 Kudos
2 Replies
Steven_L_Intel1
Employee
345 Views
Thanks for your suggestion - I will pass it on. A choice of All would result in much larger executables for many, for example, programs that use the WIndows API modules. "Used" might be a good compromise.
0 Kudos
DavidWhite
Valued Contributor II
345 Views
Thanks for finding this Ashley. It does not just apply to mixed language projects. I could not work out why in some projects, I was unable to see the parameter values. Regards, David
0 Kudos
Reply