adamanthaea
Programmer
I'm using CVF and am trying to get the basics of creating a DLL down so I can go on and do something bigger. I can get both the DLL and the EXE to compile properly. However, when I try to execute the program, it won't execute because it can't find the DLL. Here is my code for the program inside the DLL:
PROGRAM retention
END
SUBROUTINE VISC (tk, viscosity)
!DEC$ ATTRIBUTES DLLEXPORT :: VISC
REAL tk, viscosity
viscosity=(1.e-6*(5.6159426 + 0.053286909*tk))/(1 + 0.0002676519*tk)
END SUBROUTINE
And the code for the EXE is:
PROGRAM main
!DEC$ ATTRIBUTES DLLEXPORT :: VISC
REAL viscosity, tk
READ *,tk
CALL VISC (tk, viscosity)
PRINT *,tk,viscosity
STOP
END
I've tried just about everything I can think of. Manually moving the DLL to either the project folder, the debug folder, or the release folder results in a DFORRTD.DLL error instead of a missing retention.DLL error. I attempted to put the executable in a subfolder directly under the folder where the DLL is with no luck.
The error message is:
This application has failed to start because retention.dll was not found. Re-installing the application may fix this problem.
There is probably something incredibly stupid that I'm missing, but I cannot figure out what it is. Each program was coded in it's own little project folder. When I tried importing the projects into the same workspace, the DLL would compile properly but the EXE would not. Any help would be greatly appreciated.
PROGRAM retention
END
SUBROUTINE VISC (tk, viscosity)
!DEC$ ATTRIBUTES DLLEXPORT :: VISC
REAL tk, viscosity
viscosity=(1.e-6*(5.6159426 + 0.053286909*tk))/(1 + 0.0002676519*tk)
END SUBROUTINE
And the code for the EXE is:
PROGRAM main
!DEC$ ATTRIBUTES DLLEXPORT :: VISC
REAL viscosity, tk
READ *,tk
CALL VISC (tk, viscosity)
PRINT *,tk,viscosity
STOP
END
I've tried just about everything I can think of. Manually moving the DLL to either the project folder, the debug folder, or the release folder results in a DFORRTD.DLL error instead of a missing retention.DLL error. I attempted to put the executable in a subfolder directly under the folder where the DLL is with no luck.
The error message is:
This application has failed to start because retention.dll was not found. Re-installing the application may fix this problem.
There is probably something incredibly stupid that I'm missing, but I cannot figure out what it is. Each program was coded in it's own little project folder. When I tried importing the projects into the same workspace, the DLL would compile properly but the EXE would not. Any help would be greatly appreciated.