- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have got a Problem with my Compaq Visual Fortran 6.6A.
I open a ASCII file in then console main program.
PROGRAM TEST_MAIN
IMPLICIT NONE
INTEGER CHANAL
CHARACTER CSTRING * 132
CHANAL = 99
OPEN ( CHANAL , FILE = 'TEST.DAT' )
CALL READ_STRING ( CHANAL , CSTRING )
WRITE ( 6 , "(A)" ) CSTRING
CLOSE ( KANAL )
STOP
END
In a DLL subroutine I will read a character-string from opened chanal.
The subroutine is exported by a modul definition file (TEST.DEF )
SUBROUTINE READ_STRING (CHANAL , CSTRING )
IMPLICIT NONE
INTEGER CHANAL
CHARACTER CSTRING * (*)
READ ( CHANAL , '(A)' ) CSTRING
RETURN
END
I got following error message.
forrtl: severe (29): file not found, unit 99, file H: estfort.99
Image PC Routine Line Source
DFORRTD.DLL 00234BD9 Unknown Unknown Unknown
DFORRTD.DLL 00234A39 Unknown Unknown Unknown
DFORRTD.DLL 00233C04 Unknown Unknown Unknown
DFORRTD.DLL 0023403A Unknown Unknown Unknown
DFORRTD.DLL 002644E8 Unknown Unknown Unknown
Test_DLL.dll 10001040 READ_STRING 9 Test_dll.for
test_main.exe 00401086 TEST_MAIN 13
TEST_MAIN.FOR
test_main.exe 0043F119 Unknown Unknown Unknown
test_main.exe 00428469 Unknown Unknown Unknown
KERNEL32.dll 77E97D08 Unknown Unknown Unknown
When I place the open in a additional subroutine in a secondary DLL,
this progam will work well.
SUBROUTINE OPEN_FILE ( CHANAL )
IMPLICIT NONE
INTEGER CHANAL
OPEN ( CHANAL , FILE = 'TEST.DAT' )
RETURN
END
What ist the reason?
Thanks for help
I have got a Problem with my Compaq Visual Fortran 6.6A.
I open a ASCII file in then console main program.
PROGRAM TEST_MAIN
IMPLICIT NONE
INTEGER CHANAL
CHARACTER CSTRING * 132
CHANAL = 99
OPEN ( CHANAL , FILE = 'TEST.DAT' )
CALL READ_STRING ( CHANAL , CSTRING )
WRITE ( 6 , "(A)" ) CSTRING
CLOSE ( KANAL )
STOP
END
In a DLL subroutine I will read a character-string from opened chanal.
The subroutine is exported by a modul definition file (TEST.DEF )
SUBROUTINE READ_STRING (CHANAL , CSTRING )
IMPLICIT NONE
INTEGER CHANAL
CHARACTER CSTRING * (*)
READ ( CHANAL , '(A)' ) CSTRING
RETURN
END
I got following error message.
forrtl: severe (29): file not found, unit 99, file H: estfort.99
Image PC Routine Line Source
DFORRTD.DLL 00234BD9 Unknown Unknown Unknown
DFORRTD.DLL 00234A39 Unknown Unknown Unknown
DFORRTD.DLL 00233C04 Unknown Unknown Unknown
DFORRTD.DLL 0023403A Unknown Unknown Unknown
DFORRTD.DLL 002644E8 Unknown Unknown Unknown
Test_DLL.dll 10001040 READ_STRING 9 Test_dll.for
test_main.exe 00401086 TEST_MAIN 13
TEST_MAIN.FOR
test_main.exe 0043F119 Unknown Unknown Unknown
test_main.exe 00428469 Unknown Unknown Unknown
KERNEL32.dll 77E97D08 Unknown Unknown Unknown
When I place the open in a additional subroutine in a secondary DLL,
this progam will work well.
SUBROUTINE OPEN_FILE ( CHANAL )
IMPLICIT NONE
INTEGER CHANAL
OPEN ( CHANAL , FILE = 'TEST.DAT' )
RETURN
END
What ist the reason?
Thanks for help
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you created the console application, one of the project wizard dialog boxes asked if you were going to use this with a Fortran DLL. If you checked the box for that, it would change the project settings so that the console application uses the shared Fortran run-time DLL. If not, then the console application and your DLL have independent copies of the Fortran run-time, and they don't know about each other.
Go into Project..Settings..Libraries in the console app and change the Run-Time Libraries setting to Single-Threaded DLL (or whatever is shown in this option for your DLL.)
Steve
Go into Project..Settings..Libraries in the console app and change the Run-Time Libraries setting to Single-Threaded DLL (or whatever is shown in this option for your DLL.)
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
when I do that, i got the following error message
dfordll.lib(DFORMAIN.OBJ) : error LNK2001: unresolved external symbol __imp___fpieee_flt
Debug/test_main.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
dfordll.lib(DFORMAIN.OBJ) : error LNK2001: unresolved external symbol __imp___fpieee_flt
Debug/test_main.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you also have MS Visual Studio installed? If so, download and install Visual Studio Service Pack 5.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Part of your problem is probably that your TEST_MAIN program is closing KANAL and not the CHANAL variable you used earlier. KANAL is undeclared and uninitialized.
Mike
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I too have a related problem with switching to the FORTRAN DLL. I am using Fortran 6.1A and just switched the project from using statically linked Fortran Runtimes to DLL runtimes and I get the same linker error with __imp___fpieee_flt.
As suggested, I applied SP5 for Visual Studio (again) but that did not make any difference. The program linked and ran fine before the switch to DLL runtimes.
Any help or suggestions you could provide I would appreciate.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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