- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have long used VB structures to implement complex numbers in VB which can be passed to and from Fortran subs. This has always worked fine in the past. Recently, since upgrading to VS2013 I find that when debugging the code I cannot view the local variables in the Fortran code. The debugger tells me that all the complex variables are "CXX0017: Error: symbol "xx" not found" or "Cxx068: Error: type not supported". Has something changed in VS2013, or in IVF?
For what it is worth the code seems to work fine, I just can't view the variables. Hence when the code is not working fine it is virtually impossible to debug.
I have example code if this helps.
Public Class Form1
Friend test(1) As Complex
Public Sub New()
Dim result As Double
' This call is required by the designer.
InitializeComponent()
test(0).Real = 1.0
test(0).Imag = 0.0
test(1).Real = 0.0
test(1).Imag = 1.0
' Add any initialization after the InitializeComponent() call.
Dll1(test(0), result)
End Sub
end class
subroutine Dll1( test, result_ )
! Expose subroutine Dll1 to users of this DLL
!DEC$ ATTRIBUTES DLLEXPORT::Dll1
!DEC$ ATTRIBUTES ALIAS:'Dll1' :: Dll1
!DEC$ ATTRIBUTES REFERENCE :: test
!DEC$ ATTRIBUTES Value :: Result_
complex(8) test(0:1)
real(8) result_
complex(8) temp
temp = test(0) * test(1)
result_ = real(temp)
return
end subroutine Dll1
Option Strict Off
Option Explicit On
Module numerical
'Public Structure Complex
Public Real As Double
Public Imag As Double
Return c
End Operator
Public Overloads Shared Operator *(ByVal a As Double, b As Complex) As Complex
Dim c As Complex
c.Real = a * b.Real
c.Imag = a * b.Imag
End Structure
Declare Sub Dll1 Lib "Dll1.dll" ( ByRef test As Complex, ByVal result As Double)
End Module
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve
I located the problem. In VS Options/Debugging/General) I had check the "Use Managed Compatibility Mode". Changing this corrected the problem.
I remember setting this option to correct for some previous problems, but I don't remember what that was at this point. If I discover that situation again I will repost.
Thanks for your help.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Fortran debugger support isn't getting loaded. What is the exact version of Intel Fortran you have installed? In VS2013, select Help > About. Look for Intel Visual Fortran and tell us what "Package ID" is reported.
If you are using a version that supports VS2013, which would be 2013_sp1.1 or later, then I suggest uninstalling Fortran, deleting the Intel Fortran folder under Program Files (x86)\Microsoft Visual Studio 12.0, then reinstalling.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the latest version installed.
Can I just reinstall from w_fcompxe_novsshell_2013_sp1.1.139 (1).exe? Will I need to lookup some code for this to install?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, that's not the latest version, but it should work. Yes, you can reinstall from that and won't need any code. Make sure you do the uninstall/folder delete/reinstall, not just a "repair".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no folder "Intel Fortran" in Program Files (x86)\Microsoft Visual Studio 12.0. I will go ahead and reinstall anyways.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I uninstalled, no Fortran folder found, reinstalled, problem is unchanged.
I actually had 2013 SP3 and installed that.
Now what?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you attach a ZIP of a solution, with the VB and Fortran projects, that I could look at? Can you view other variables ok?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oops, I see that Result_ in the F90 code should not be passed as value, but that has no effect on the problem that I am getting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My guess is that you're still not seeing the Fortran debug support and instead are getting C's. It works for me, though. I do find that when I am using a .NET project that I need to set the target platform to x86 when running on an x64 system, though I see there is a "prefer x86" option which may make that unnecessary.
Can you show me a screenshot of your locals window?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried targeting X86 and that did not make a difference.
This all worked in VS2010 before I upgraded - just want to make sure that you are not using VS2010 or VS2012 as they both worked for me as well. This is unique to VS2013, which I upgraded to because I use MS Azure as a web provider and it needs VS2013. I unloaded VS2010, but I could perhaps reinstall it and try on that platform.
Here is the screen shot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve
I located the problem. In VS Options/Debugging/General) I had check the "Use Managed Compatibility Mode". Changing this corrected the problem.
I remember setting this option to correct for some previous problems, but I don't remember what that was at this point. If I discover that situation again I will repost.
Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again Steve
I found the issue. When I change the Compatibility mode then I can no longer view the complex variables in VB. At this point there does not appear to be a solution in both languages.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right - now I remember that. When you have that option on, it disables the Fortran expression evaluator - there is nothing we can do about that.
![](/skins/images/8B5EA638CA3587CA763EE9EF53643DD4/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page