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

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

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".

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

Steve - Intel Developer Support

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today