
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I switched from VS2015 with integrated "parallel_studio_xe_2017_update2_composer_edition_for_fortran" to VS2022 with integrated
"intel-fortran-compiler-2025.0.4.19" over a mixed language solution, where I call a fortran function from a C++ application in the form of a dll library. The migration of the solution from the original platform to the new platform was successful, in the properties settings of the fortran projects
I only replaced IFORT with IFX. The new solution was successfully built, but the application failed to load the new compiled fortran dll libraries, but the old fortran dll libraries compiled on the previous platform loaded successfully. At experimentation, I found that if I reduce the code size of the newly compiled fortran dll library sufficiently, the library will load. Is this a bug in the new development environment or a setting in the project properties? Or is the freely downloadable version of fortran compiler is limited by code length?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, your message led me to a solution to the problem. I used the dependency walker program and it occurred to me to copy the necessary dll libraries marked in it from the installation directory of the fortran compiler to the directory of the running application.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are no limits because it is free. It is the full product. You have some other problem.
What fails, is it the load library call? What is the error message if you ask for it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sample of c++ code of loading the library Diagnose.dll:
hDllDiagnose = LoadLibrary("Diagnose.dll");
if (!hDllDiagnose)
{
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&lpMsgBuf,
0,
NULL);
CString log;
log.Format("Load error 'Diagnose.dll': %s", lpMsgBuf);
log.TrimRight('\r');
Log(log, true);
LocalFree(lpMsgBuf);
}
else
pfDiagnose = (TDiagnose)GetProcAddress(hDllDiagnose, "Diagnose");
C++ application reports when it starts: " Load error 'Diagnose.dll': module not found " and "Error GetProcAddress (Diagnose) ",
the same old dll library (compiled using an older version of the fortran compiler) loads without a problem ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tried testing the dll using the full path in the name string?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "module not found" error is misleading - more often this happens because the DLL you are loading depends on some other DLL that cannot be found using the paths Windows uses. The most common reason for this is that the DLL was built as a Debug configuration, and the dependent DLLs are not available outside of the Visual Studio environment. Make sure that you have selected a Release configuration for the DLL build. If that doesn't fix it, ask again here.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The DLL was built in Release-x64 configuration and the application was run on a system with VS2022 installed. When a sufficient part of the code is removed (it doesn't matter which, i.e. it doesn't matter whether a specific part is removed, the removed part contains only internal code without calling any external functions), the DLL is loaded. The complete original DLL built in an older development environment (VS2015 and fortran 2017) on another computer is also loaded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "external functions" is the key. I suggest using the Dependencies app to analyze the DLL and see what it's looking for.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, your message led me to a solution to the problem. I used the dependency walker program and it occurred to me to copy the necessary dll libraries marked in it from the installation directory of the fortran compiler to the directory of the running application.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page