- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I am writing a Fortran program using Visual Studio and the ifort compiler. I would now like to use a DLL that has been made available to me. This was also written in Fortran. I already had a similar problem with a DLL written in C++, which was solved here (https://community.intel.com/t5/Intel-Fortran-Compiler/Integrate-C-DLL-in-Fortran-Code/m-p/1410919#M162620). Of course, this solution no longer works if it is not a C++ DLL.
Unfortunately, I only find suggestions on how Fortran DLLs can be used in other programming languages. What I have found are approaches like:
!DEC$ ATTRIBUTES DLLIMPORT :: libdiscon
!DEC$ ATTRIBUTES C, ALIAS:'DISCON' :: DISCON
call DISCON(SWAP, Fail, infile, outname, msg )
The DLL I want to use is called libdiscon.dll. It contains the subroutine DISCON(), which I would like to access. I have placed libdiscon.dll in the debug folder of Visual Studio.
I would be very grateful if someone could help me.
Best regards
Link Copied
- « Previous
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If this crashes, then this points bask to an argument error or code between the load dll and call corrupted the dll.
Jim:
I have been following along, I wish I was this good, but anyway, what was the word you meant above at bask, is it back?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, back. A typographical error on my part. Euphemistically a bug in the instructions.
Spellchecker didn't catch this, perhaps a grammar checker would have caught this.
Thanks for pointing this out.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello together,
to ensure the error was not caused by a damaged DLL, as you also supposed, I replaced it with another one that I furtunately found. Now I finally receive messages from the controller code. Nevertheless, the proposed debugging options will certainly also be helpful in the future. Many thanks for your patient help and best regards!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
- Next »