- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a bit of code that opens a file for reading, reads from it, rewinds to the beginning and then starts writing to it. It seems a bit strange to me, but that code has been there for ages and works fine.
However I have just built a new DLL which uses this code, and when I try to do the writing, I get:
forrtl: severe (47): write to READONLY file, unit 19, file...
I'm trying to find out what causes this problem, I can only think it has something to do with complier options, but I can't see which one it is.
Can anyone help?
However I have just built a new DLL which uses this code, and when I try to do the writing, I get:
forrtl: severe (47): write to READONLY file, unit 19, file...
I'm trying to find out what causes this problem, I can only think it has something to do with complier options, but I can't see which one it is.
Can anyone help?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are just now moving this code into a DLL, make sure that the executable that uses it is linked against the DLL run-time libraries. (In Fortran, this is Libraries > Use Runtime Library > Multithreaded DLL.) This setting must match the one used for building the DLL. If you don't, then the EXE and DLL don't know about each other's units.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve, I got it sorted out.
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