I can't seem to get my Fortran COM DLL registered on any machine that doesn't have Compaq Fortran (6.6A) already installed. "regsvr32 scodbond.dll" returns an error box saying "LoadLibrary ("scodbond.dll") failed. GetLastError returns 0x00000485". On another machine I get a slightly differernt error message: "The specified module could not be found." The documentation "Deploying the Server on Another System" seems to say that this "regsvr32" command shuld do it. Does anyone know what I'm doing wrong?

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

You need the CVF Run-Time Redistributables kit installed, just as you would with any CVF-generated DLL (or EXE dependent on CVF DLLs) on a system where CVF is not installed.


Retired 12/31/2016

Hi, When I try to register a com dll with regsvr32.exe I get the error saying something like:

...fortrancom.dll failed. "The specified module could not not be found." So I downloaded and executed VFRUN66AI.exe as you said and I still get the same error. I don't get the error on machine that have visual fortran installed.

Also, do you know if a fortran com dll can be used with Microsoft .NET in an ASP.NET page? I can't get that to work either but I can get C++ dlls to work. thank you.

I have no idea - sorry. Never played with ASP.


Retired 12/31/2016

Thanks for the info Steve. I actually did find out about VFRUN66AI.exe after posting my question, but it doesn't fully help. I might be having the same problem as "deesnoop" mentions in his first posting. I get the error "Loadlibrary ("scodbond.dll") failed. The specified module could not be found." I checked, and VFRUN66AI does seem to have installed the files in its list, placing them into the system directory, and I checked that the registry knows about one of them (DFORRT.DLL). So it probably ran OK. On a machine with Compaq Fortran installed (and so where regscvr32 works) I can also get the same error as I get on the problem machines - by either purposely mistyping the DLL's file name, or by renaming DFORRT.DLL (so it no longer exists). So I'm not sure what "module" regsvr32 can't find.

I have a guess - you built your DLL in a Debug configuration. This makes it dependent on non-redistributable DLLs. Rebuild in a Release configuration and see if that helps.


Retired 12/31/2016


Thanks - you're right, I am in the debug mode, and so that sounds like that might be it. I'll give it a try tomorrow.

I tried switching to a "release" version, and it seemed to help. I'm actually trying to send 2 DLL COM's to another user, and now one registers OK, but for the other regsvr32 still gives the less-than-helpful "module cannot be found" error. (I basically followed the same steps in creating both DLL's so it's confusing that only one works!) There's probably a utility somewhere that lists the files that a given DLL needs - does anyone know of one?

Use "Dependency Walker" from CVF's program group.

I tried Dependency Walker, and it was what I wanted. Unfortunately, it didn't help. I have 6 DLL's that are similarly built. I had old DOS codes that took command line inputs, read files, made calculations, and then wrote screen output and files. I used the same procedure on all to convert to DLL COM objects. 5 of them register fine (after installing VFRUN66AI.exe and changing to "release"), but this last one doesn't. Dependency Walker shows the exact same list of 10 DLL's used by this troublesome one and for one that registers OK. I'll keep searching for an answer.

I have a hunch that the cause is something stupid; are you sure you didn't misspelled the dll name? Did you perhaps forget to terminate strings with char(0) in DllRegisterServer?

...hint: you can debug what's happening by putting breakpoint(s) in DllRegisterServer and specifying regsvr32 as "Executable for debug session".

I finally got my DLL to register. (Thanks to Novi Sad for the hint.)
In review: I previously had two mistakes that prevented my DLL from registering (using regsvr32) on machines that did not have Fortran installed. The mistakes I made were:
1. I hadn??t installed the necessary run-time DLL??s (VFRUNAI66.EXE).
2. I was compiling in ??debug?, instead of ??release? mode.
With the corrections, 5 of my 6 (all very similar) DLL??s registered OK, but one would not register. I would get the message:
LoadLibrary (??scodbond.dll?) failed. The specified module could not be found.
which you can get by mistyping the DLL name (this was not the problem), but this can also occur for other reasons (such as other required DLL missing).
I was still in the mode of thinking it was caused by not having Fortran installed on the machine, but it turns out that the problem only occurred on the one ??non-Fortran? machine that I was trying (my daughter??s new XP-pro machine). I since found that it registers fine on two other non-Fortran machines (one Windows 98 and the other XP-home).
I tried Novi Sad??s advice to use breakpoints in RegisterServer, but I didn??t know what running ??regsvr32 as executable for debug session? meant. Being an old-timer, I instead put in writes to a file. The result was that I found that the DLL??s registration was never even being called on the one problem machine. I then tried using ??Run? to run regsvr32, and it worked! Of course, in ??Run? I had to use a full path name in referencing the DLL, and so I tried using the full path name for the DLL in a DOS call to regsvr32, and it also worked fine! So it might be a DOS/Windows problem (or maybe it??s because I don??t know anything about using DOS in XP-pro).
In summary, I have been using a DOS window, under XP-pro, and running from the subdirectory containing the DLL??s. Using:
regsvr32 scodbond.dll
failed, but:
regsvr32 c:wsmilescodbond.dll
worked. However, for the five other DLL??s, regsvr32 worked fine without the full path. This was consistent over several tries, and not due to mistyping. I don??t know what??s going on, but at least I can get it to register now. Thanks for everyone??s help.

Hi Steve,
Is there a version of this kit for the new Intel 10.0 compiler? I am trying to
use a DLL I built with the COM wizard on another computer (by copying the DLL
only to the other computer), but it is not working. I attempted to register the
DLL on the other computer by typing "regsvr32 COMServer.dll", but I
keep getting this error:
-- LoadLibrary("COMServer.dll") failed - This application has failed
to start because the application configuration is incorrect. Reinstalling the
application may fix this problem --
Any help would be appreciated!
Jason C.

Submit a request to Intel Premier Support for the redistributable kit. Eventually we'll have it on the public web site.

Retired 12/31/2016

Thanks for the tip, Steve. I ran the redistributable executable F_REDIST_IA32.exe that Intel Premier Support sent me, but it did not seem to help. I have transferred all the necessary DLLs to a Path folder in a WinXP SP2 virtual PC that does not have a copy of Visual Studio installed. When I run Dependency Walker on my DLL, I get this error:
"Error: The Side-by-Side configuration information for "c:myProjectmydll.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001)."
If anyone has any other ideas, I would appreciate hearing them.
Jason C.

I think you may need to also install the VS DLLs on the target system. If you're using VS2005, use this.

Retired 12/31/2016

Some of the problems you are having are remarkably similar to ones I reported over the last few weeks, with my App running on all but one apparently identical machines.

Even though Dependency walker was able to find all the DLL dependencies, apparently WinXP doesn't always find them all, resulting in being unable to run the App.

The work around in my case was to copy the runtime DLL's into system32, instead of the App install folder, even though this folder is on the PATH. Why this should be necessary is not apparent at this time.

Hi David,
Thanks for the input on this. I attempted to put all the DLL's that my dll needs to run in system32, but I am still getting this error when I run Dependency Walker:

Error: The Side-by-Side configuration information for "c:windowssystem32mydll.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).

I have installed vcredist_x86.exe and F_REDIST_IA32.exe on the target machine; I've made sure I am using the Release version of my DLL; I put all the required DLL's into system32, as well as any manifest files (since someone once suggested that might help). Is it just impossible to distribute a DLL to a Virtual PC (WinXP SP2) maybe?

I would check PATH to make sure that only the correct DLLs are being seen.

Retired 12/31/2016

Hi Steve,
Thanks for the advice. I've checked the PATH and made sure their were no duplications of dependent DLLs; so only the ones I knew about were being loaded. I was going to start another thread asking for detailed directions on how to distribute a DLL, but thought I should check here first and see if one already exists. I am somewhat at a loss, as I have done everything both you and the Intel Premiere Support reps have suggested, as well as updating the Virtual PC I am attempting to run this DLL on (WinXP-SP2, with Rootkit, .Net 1.1, 2.0, and 3.0 installed), but I am still getting the "side-by-side" error with Dependency Walker. Maybe I am missing one of the very first steps and don't know it? So, if you or anyone knows where I can find specific directions on how to distribute a dynamically linked, COM-wrapped, Fortran DLL, I would really appreciate it.

Thanks for your help,
Jason C.


Have you attached the DLL and your program to the support issue? If not, please do so and tell me the issue number so I can look at it.

Retired 12/31/2016

I have attached the DLLs (both release and debug versions) to issue number 451991. The calling program is just a simple call from within an Excel worksheet, and so I didn't include it. I will upload it if necessary though.
Thanks again,
Jason C.

Leave a Comment

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