I am not an experienced programmer. I program out of necessity to implement scientific algorithms for subsurface fluid flow (oil industry). Since many years I have been writing Fortran 90 code, compiling it using Fortran Powerstation 4.0 (this is a very old 32 bit compiler), producing DLLs and accessing them from Excel using a VBA i/o interface. All this worked (and still works) pretty well.
Recently I have been implementing a rather complex model, so the runtimes on a single processor on my normal Win32 machine became too long. Still, also for this problem, the method I described above works well, just too slow.
After some reading, I decided to move my project to a more powerful computer (an 8 core Xeon with Nvidia GPU) with Win64 and the PGI Fortran compiler.
Since I did this, the interface between the DLL (e.g. proj1.dll) and the VBA code does not work anymore. When running the program in the new 64 bit Excel I get the message “file not found – proj1.dll“. I hardwired the path of the DLL in the VBA code, so it should find it.
I compile the DLL using:
pgfortran -Bdynamic -c file1.f90
pgfortran -Bdynamic -c file2.f90
pgfortran -Bdynamic -c file3.f90
pgfortran -Bdynamic -c file4.f90
pgfortran -Bdynamic -c file5.f90
pgfortran -Bdynamic -c file6.f90
pgfortran -Mmakedll file1.obj file2.obj file3.obj file4.obj file5.obj file6.obj -o proj1.dll[/i]
There are no compiler or link errors; the compiler produces the DLL. I did not add any compiler directives to the Fortran code other than the DLLEXPORT (the same as I was doing before):
!DEC$ ATTRIBUTES DLLEXPORT :: subroutine
Can anybody please help me solve this problem?