Unable to load DLL

Unable to load DLL

For a few years I have been developing VB applications which call routines from a FORTRAN DLL which is a seperate project in the same solution.  I had not worked on one of these apps for a year until I recently when I started developing another similiar app.  When I tried to run the solution in debug, the GUI displays fine and allows me to enter data.  However, when I ask the program to perform a calculation which requires a routine in the DLL I receive the error "Unable to load DLL".  The solution places the FORTRAN DLL in the same directory as the executable.

I went back to run of the other apps I have developed and released and found that I am having the same problem.  When I rebuild it and try to run in debug inside of VS or simply from the executable in the directory I get the "Unable to load DLL" error.  When I try to run the rebuilt release executable I get the error "Attempted to read or write protected memory".  The release executable and dll that I built in March 2011 works fine.

I am using Intel(R) Visual Fortran Composer XE 2011 Update 11 Integration for Microsoft Visual Studio* 2008, 12.1.3534.2008 on a Windows XP x64 sp2 machine, and developing 32-bit solutions.



6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

The "unable to load DLL" message will be given if the DLL you are loading in turn is linked to other DLLs not available. I suggest downloading Dependency Walker and have it analyze your DLL for issues. For example, the Intel compiler DLLs may be linked in but not accessible on that system. If you are building a Fortran DLL to be called from a non-Fortran language, you can change the DLL's Libraries > Use Runtime Library property to "Multithreaded" to get the static libraries.

I don't know, offhand, what would cause the memory error.

Retired 12/31/2016


I changed the Libraries > Runtime Library from Debug Multithreaded DLL to Debug Multithreaded and Multithreaded DLL to Multithreaded and it works in both debug and release build. I have several VB.NET apps calling FORTRAN DLLs set up the same way that I'll need to change. They had been working fine up till now.

Thanks Steve


This is Hariharasuthan from Bangalore in India. I'm a .net developer but FORTRAN is very new to me. Past 30days I'm not able to solve this FORTRAN dll issue, which is Unable to load dll and I have attached that error in jpeg picture, PFA. I explore and got that few solutions from internet and I tried the same but I got the same error. I’m not able to solve that error.

But my application works good once installed Intel FORTRAN Parallel Studio XE 2013. When I remove this software, the dll throws error like unable to load dll.

I tried few steps in below
1. DLL's Libraries > Use Runtime Library property to "Multithreaded" to get the static libraries.
2. Go through this link

3. I found all missing dll files using dependency walker and placed into system folder in C drive but no use

Please guide me; any steps in the FORTRAN configuration to solve this issue


Downloadimage/jpeg error.jpg22.28 KB

I suspect that you need to use some of the Intel redistributal libraries included with the compiler when installed. Along with the program executable and dlls that I create for my VB solutions that call Fortran dlls, I include the libraries: libiforemd.dll, libifportmd.dll and libmmd.dll.


I don't recognize the DLL in the error message - it is not one we provide. However, the message otherwise indicates that the DLL it names was linked using a shared or private assembly and thus you have to install that assembly rather than copying the DLL to Windows\System. Find out who provides that DLL and get a shared or private assembly you can install.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today