- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have simple application that I have got to compile in FORTRAN. This will grow into several files with multiple subroutines and functions and I need to eventually call from VB. I am trying to get the basics down and then move on to the tought stuff!
2 Projects in 1 workspace
Project 1 just has 1 file:console.for
PROGRAM MAIN
EXTERNAL MYDLL
!DEC$ ATTRIBUTES DLLIMPORT :: MYDLL
!DEC$ ATTRIBUTES ALIAS: 'MYDLL'::MYDLL
CHARACTER (LEN=20) STR_IN, STR_OUT, STR_RPT
STR_IN = 'meltpump.in'
STR_OUT = 'meltpump.out'
STR_RPT = 'meltpump_report.out'
CALL MYDLL(TRIM(STR_IN), TRIM(STR_OUT), TRIM(STR_RPT))
END
The 2nd project has 2 files:mydll.for and testfil.for
mydll.for
SUBROUTINE MYDLL(STR_IN, STR_OUT, STR_RPT)
!DEC$ ATTRIBUTES DLLEXPORT :: MYDLL
!DEC$ ATTRIBUTES ALIAS:'MYDLL'::MYDLL
IMPLICIT REAL (KIND=8) (A-H,O-Z)
EXTERNAL TEST2TIM
CMKM DECLARED VARIABLES FOR INPUT FILE, OUTPUT FILE AND FIND_DOT SUBROUTINE
CHARACTER (LEN=20) STR_IN, STR_OUT, STR_RPT
INTEGER LEN2DOT, FIND_DOT
DIMENSION H(20,10), DUM(3)
C CHARACTER*79 COMN1,COMN2
DIMENSION XL(3),X(3,2),F(3),A(3,3),WORK(60),WEIGHT(3),XI(3)
DIMENSION BETA(2),E(2),AXT(2),AYT(2),W(2),THETA(2),BAP(2)
DIMENSION TORX3(2),TORY3(2),TORZ3(2),SON(2),DEF(2),BMF(2)
DIMENSION BMG(2),SF(2),SFF(2),SG(2),SFG(2)
DIMENSION QT(2,10),QT1(2,10),QT2(2,10)
INTEGER INERR,OUTERR
INTEGER RESSEL
REAL (KIND=8) AA,BB,CC,DD,EE,FFFF,BT,CHG,TREF,TAUC,PCF
AA = TEST2TIM(8,5)
END
testfil.for
FUNCTION TEST2TIM (NUMIN, NUMOUT)
REAL (KIND=8) NUMIN, NUMOUT
NUMOUT = NUMOUT * 2
TEST2TIM = NUMOUT
END
I can step into the main program with the debugger in visual C++ 6, but when I get to the call to mydll, my app bombs and I get:
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32kernel32.dll', no matching symbolic information found.
Loaded 'C:TESTFORTRANCONSOLMYDLLMYDLL.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32user32.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32gdi32.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32advapi32.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32 pcrt4.dll', no matching symbolic information found.
First-chance exception in CONSOLMYDLL.exe: 0xC0000005: Access Violation.
The thread 0x940 has exited with code 1 (0x1).
The program 'C:TESTFORTRANCONSOLMYDLLDebugCONSOLMYDLL.exe' has exited with code 1 (0x1).
Is there way to get the debugger to step into the code inside of the subroutine in another file?
Thanks
2 Projects in 1 workspace
Project 1 just has 1 file:console.for
PROGRAM MAIN
EXTERNAL MYDLL
!DEC$ ATTRIBUTES DLLIMPORT :: MYDLL
!DEC$ ATTRIBUTES ALIAS: 'MYDLL'::MYDLL
CHARACTER (LEN=20) STR_IN, STR_OUT, STR_RPT
STR_IN = 'meltpump.in'
STR_OUT = 'meltpump.out'
STR_RPT = 'meltpump_report.out'
CALL MYDLL(TRIM(STR_IN), TRIM(STR_OUT), TRIM(STR_RPT))
END
The 2nd project has 2 files:mydll.for and testfil.for
mydll.for
SUBROUTINE MYDLL(STR_IN, STR_OUT, STR_RPT)
!DEC$ ATTRIBUTES DLLEXPORT :: MYDLL
!DEC$ ATTRIBUTES ALIAS:'MYDLL'::MYDLL
IMPLICIT REAL (KIND=8) (A-H,O-Z)
EXTERNAL TEST2TIM
CMKM DECLARED VARIABLES FOR INPUT FILE, OUTPUT FILE AND FIND_DOT SUBROUTINE
CHARACTER (LEN=20) STR_IN, STR_OUT, STR_RPT
INTEGER LEN2DOT, FIND_DOT
DIMENSION H(20,10), DUM(3)
C CHARACTER*79 COMN1,COMN2
DIMENSION XL(3),X(3,2),F(3),A(3,3),WORK(60),WEIGHT(3),XI(3)
DIMENSION BETA(2),E(2),AXT(2),AYT(2),W(2),THETA(2),BAP(2)
DIMENSION TORX3(2),TORY3(2),TORZ3(2),SON(2),DEF(2),BMF(2)
DIMENSION BMG(2),SF(2),SFF(2),SG(2),SFG(2)
DIMENSION QT(2,10),QT1(2,10),QT2(2,10)
INTEGER INERR,OUTERR
INTEGER RESSEL
REAL (KIND=8) AA,BB,CC,DD,EE,FFFF,BT,CHG,TREF,TAUC,PCF
AA = TEST2TIM(8,5)
END
testfil.for
FUNCTION TEST2TIM (NUMIN, NUMOUT)
REAL (KIND=8) NUMIN, NUMOUT
NUMOUT = NUMOUT * 2
TEST2TIM = NUMOUT
END
I can step into the main program with the debugger in visual C++ 6, but when I get to the call to mydll, my app bombs and I get:
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32kernel32.dll', no matching symbolic information found.
Loaded 'C:TESTFORTRANCONSOLMYDLLMYDLL.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32user32.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32gdi32.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32advapi32.dll', no matching symbolic information found.
Loaded 'C:WINDOWSsystem32 pcrt4.dll', no matching symbolic information found.
First-chance exception in CONSOLMYDLL.exe: 0xC0000005: Access Violation.
The thread 0x940 has exited with code 1 (0x1).
The program 'C:TESTFORTRANCONSOLMYDLLDebugCONSOLMYDLL.exe' has exited with code 1 (0x1).
Is there way to get the debugger to step into the code inside of the subroutine in another file?
Thanks
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Those messages about "no matching symbolic" are information only and you can ignore them.
In CVF you could insert a break point (F9) at the line with CALL MYDLL, another break point at the first line in SUBROUTINE MYDLL, start debugging with "Go" (F5), then step forward with F11. But I don't know if "Fortran 7.2" has the same GUI or not.
And let me guess that you are trying to send something to the console inside your DLL, which causes the error.
Sabalan.
In CVF you could insert a break point (F9) at the line with CALL MYDLL, another break point at the first line in SUBROUTINE MYDLL, start debugging with "Go" (F5), then step forward with F11. But I don't know if "Fortran 7.2" has the same GUI or not.
And let me guess that you are trying to send something to the console inside your DLL, which causes the error.
Sabalan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll assume that the Fortran version here is really 7.1. Neither Intel Fortran nor CVF have had a 7.2.
The instructions in this CVF Knowledge Base article should also work for Intel Fortran regarding debugging of DLLs.
Steve
The instructions in this CVF Knowledge Base article should also work for Intel Fortran regarding debugging of DLLs.
Steve
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
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