- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been given the task of creating a Fortran dll and linking it to a VB.Net.
I have down loaded and installed
- Visual Studio 2022 (64 bit) ver. 17.14.16
- Intel oneAPI-HPC-toolkit 2025.2.1.46
- down loaded ipsx2019-samples-win-20190321.zip
Windows 10 pro
I extracted the MixedLanguage example VB_Calls-Fortran
When I try to load the solution I first get a message to upgrade to 4.8 framework because the solution framework is no longer supported. Upgrade seems to work.
When I try to build the solution I get an error saying that 32 bit is not supported in ifx.
I change both the fortran and vb projects to 64 bit debug.
Everything seems to compile correctly but when I try to run the program without debug I get an exception unhandled message -- Unable to load DLL 'FCALL.DLL': The specified module could not be found. -- on line 179 of the Form1.vb code. (Call DLL_ROUT(DBL_IN, MULTIPLIER, DBL_OUT)
I have checked and FCALL.Dll is in the 'VBCallsFortran/bin/debug/' directory along with the VBCallsFortran.exe.
Can someone tell me where I went wrong or do you have an simple example similar to this which works with Visual Studio 2022 and the current ifx.
Thanks in advance
David Cooper
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>but when I try to run the program without debug
Is this from within MS VS or outside MS VS?
If when running the program outside of MS VS then the path to the DLL is not found.
To correct this, either place the DLL in the same folder as the *.exe
.OR.
Register the DLL see this.
Something like
cd \VBCallsFortran/bin/debug
regsvr32 /s FCALL.DLL
When switching to release mode, unregister the debug FCALL.DLL and then register the release FCALL.DLL (which presumably will be located within your distribution directory).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I changed the validation to within BtnAdd and got rid of KeyDown-enter validation in Form1.vb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also,
Debug > Options > Debugging > General and uncheck "Enable Just My Code." This allows the debugger to step into external code, including your DLL.
Enable mixed-mode debugging by going to the project's Properties > Debug and selecting "Enable native code debugging"
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page