連結已複製
Per Microsoft jargon, "unmanaged" and "native" appear to be synonymous.
Not sure why you're unable to examine values of arguments, I don't have that issue albeit with other .NET/Fortran projects.
Brian Murphy wrote:
I am using VS 2012 Update 4 and IVF Composer XE 2013. Are you saying that if you load this sample (from MixedLanguage.zip), change that debug setting, build it, and step into the fortran that you can examine the values of the arguments? One of the arguments is a 1d array DBL_IN. The "value" that the debugger gives me for this seems to be a memory address.
I don't have that issue albeit with other .NET/Fortran projects.
How do you paste a screen shot into a forum posting? I've attached a gif file of my screen shot.
It turns out I was only partly right. For the argument DBL_IN the debugger only gives me a memory address, but for DBL_OUT it gives me the individual element values. I changed the declaration DBL_IN(0:3) to DBL_IN(4), and then the debugger would give me the element values. I find it very strange that this would make any difference.
In your screen shot, I see a + sign next to DBL_IN, so that tells me you can see its element values, whereas I can't. You'll see in my screen shot that I don't have the + sign on DBL_IN.
I've been playing around with variations where I add some more arguments to the subroutine, and weird things are happening. Is the Visual Studio debugger case dependent with variable names?
I embedded the screenshot by clicking on the picture icon to the right in the editor toolbar, selecting a file, clicking Upload, and then clicking Next as needed.
The screenshot you show tells me that you don't have the Fortran debugging support loaded, so you're getting C. Note that the datatypes show as "double" and not "REAL(8)". Try this - in VS, select Tools > Options > Debugging > Edit and Continue. If "Enable native Edit and Continue" is checked, uncheck it. This option, when enabled, blocks the Fortran debugger from loading in mixed-language applications.
It looks like a bunch of my previous post got dropped somewhere.
I made the change you suggested to Tools/Options/Debugging, but it didn't make any difference. That's why I sent screen shots of all the options.
You showed only the General page, not the Edit and Continue page. But there can be other reasons the Fortran debugging support doesn't load. Sometimes an uninstall and reinstall of Fortran is needed.
That word file contained 4 pages of 7 total screen shots. Edit and Continue is on the second page. Let me know if they are not all there.
Is there anything important I need to know if I reinstall Intel Fortran? I also have IMSL.
Ah, somehow I missed that. The only thing I see different is that I have the initial "Enable Edit and Continue" box checked, though I doubt that matters here.
You can ignore IMSL - just uninstall Parallel Studio XE, delete the "Intel Fortran" folder under Microsoft Visual Studio 12.0, then reinstall. I hope this does the trick for you.
The reinstall is finished, but it doesn't seem to have made any difference. I'm still seeing C data types in the Locals window when stepping through the fortran sample code.
What else can I try?
I had installed VS 2012 Update 4, and when that didn't help, I uninstalled/installed Intel Fortran, and that didn't help. That's where I am now. I don't remember if I actually uninstalled VS 2012 before installing the update. If you think redoing everything again might work some magic, I'll do it.
The attached SimpleFortranExcelDLL.zip contains a sln project that builds a very simple DLL, and calls it from an Excel macro. When I run this, the Intel Fortran debugger displays fortran data types.
When I run the VB-Calls-Fortran sample project without modifying anything, the debugger won't step into fortran. I then check the box for "Enable native code debugging", then it will step into fortran, but the debugger shows C data types when it's in the fortran code.
My problem seems to be with the debugger going from vb.net to fortran. It's not making the switch cleanly. When you run the VB-Calls-Fortran sample, do the data types in the Locals window change from C to Fortran when the debugger steps from vb to fortran?
