- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a solution with a fortran project that compiles to an executable and c project that compiles to a static library. I am trying to debug and I am unable to step through the main portion of my fortran code. Any ideas?
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you set a breakpoint at the first executable statememt in the program. You need to do that - you can't just "step in" to the program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not positive that I know what you mean by "first executable statement." I have set a break point at the first call to a subroutine in the main section of the fortran code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, that's fine - as long as you set a breakpoint somewhere that will be executed. You then click the Go button (or press F5) to start execution, and it should stop when the breakpoint is hit. What goes wrong when you try it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I go to run it is like the break point in the main fortran code gets disabled. If I put a breakpoint inside the first subroutine that is called then the debugger will stop at that breakpoint. Here is what the call stack looks like at this point:
mf2kd.exe!PLL1IN() Line 11 Fortran
mf2kd.exe!MAIN$MF2K$BLK() + 0x2f bytes Fortran
mf2kd.exe!_main() + 0x65 bytes
mf2kd.exe!__tmainCRTStartup() Line 327 + 0x19 bytes C
mf2kd.exe!mainCRTStartup() Line 196 C
When I try to go up one level to MAIN$MF2K$BLK() it will tell me that there is no source code available for that location.
mf2kd.exe!PLL1IN() Line 11 Fortran
mf2kd.exe!MAIN$MF2K$BLK() + 0x2f bytes Fortran
mf2kd.exe!_main() + 0x65 bytes
mf2kd.exe!__tmainCRTStartup() Line 327 + 0x19 bytes C
mf2kd.exe!mainCRTStartup() Line 196 C
When I try to go up one level to MAIN$MF2K$BLK() it will tell me that there is no source code available for that location.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like you are linking in the Release version of the Fortranmain (Program) stub of your application. Either that or the path to the Fortranmain (Program) is not found.
Also, in the properties for the application (execuitable project) check the configuration manager to see if the expected configuration for the main (Program) is being linked in. Sometimes when I upgrade IVF release versions the configurations in my solutions/projects don't always update properly and I must reselect the proper configurations.
And check in your debug configuration to see if the main (Program) includes full debug information.
Jim Dempsey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page