Your problem is perhaps not related to the Fortran or C runtimes.
C++ can a dll file reference an exe file? zip file#
The project settings and DLL's in that zip file are all set to and reflect static linking. After something is built you can use dependency walker to see which DLL's it uses (if you see intel runtime dll's - you are dynamically linking).
In the project properties you can also inspect the command line for the build (Fortran > Command line) and examine the /libs:xxx command line option to see the implications of your runtime library selection.
(If you don't go down the path of static linking the runtime as suggested by Steve (which might be easiest in the short term - unless you are using OpenMP) - then don't despair - using dynamically linked runtime DLL's from within Excel is certainly possible.)Īs described upthread, you can inspect the project properties (Fortran > Runtime Libraries) to specify/see whether the runtime is being linked statically or dynamically. Or maybe it is the bitness of the operating system. Note that there are 圆4 and x86 variants - I think you get the most accurate results when you run the variant that relates to the bitness of the executable that you are applying the tool to. This is perhaps incidental - but your version of dependency walker is ancient. Note the debug runtimes are not re-distributable (there's a redist.txt file in your compiler's program files tree that tells you what you can redistribute (here I find it in the directory for the mkl documentation - which is one of the less intuitive things I have encountered this morning, and that's after three cups of coffee)) - so the fact that you can't find them on the target machine means you are following the rules.
(It is embarrassing how many times I have been tripped up by the above.) Similarly, within Excel you should ensure that the DLL that Excel is trying to load is the DLL that you think Excel should be trying to load. Make sure that the DLL you are examining is the DLL that you are building. If you are statically linking to the fortran runtime, then dependency walker should not be listing a fortran runtime DLL.
C++ can a dll file reference an exe file? code#
This is a very simple bit of fortran code that I'm compiling, just to get the methods worked out before moving on to the real deal. I've loaded both the Debug and Release versions in Dependency Walker 1.0 dated 1996.įor the Release version, it says KERNA元2.DLL, KERNALBASE.DLL and about 20 various API-MS-WIN-CORE-xxxxx files.įor the Debug version, it complains about "mismatched machine type", but then lists the same DLL's as the Release, in addition to libifcoremdd.DLL and msvcr11d.DLL So I expect to be able to do this with Intel Fortran once I get things set right. Over the years I've used Compaq 6.1 to make many DLL's, and somehow I got those to work on any computer without having to deploy anything additional. This was required to get it working on my computer. I know about the path requirements for Excel to be able to load my DLL, and my VBA code has statements to set the path. The error message is the same "file not found". The Debug and Release versions both run on my computer, but still will not on another. I changed Multithreaded DLL to Multithreaded and rebuilt everything.