I'm using Visual Studio 2019.
I have a Vb project that is calling a dll in fortran that i wrote.
The fortran code is using the library LINK_FNL_SHARED.H.
When i ran the vb project that is calling the dll,i received an error:"system.dllnotfoundexception".
Both the vb project and fortran project are in debug mode x64.
-But when i try to mark in comment the line code: CALL RNSET(ISEED),CALL RNUN(NR,R)
all is fine and the dll is recognized and the code is running!
I have added the path of the library ,the dll and the linker also.
I have tested and tried to create a project only in fortran using this library with no vb and the code is succesfull !
What am i missing in my vb project so that it can call the fortran dll using a call to LINK_FNL_SHARED.H lib?
Please see the attached files of my code .
Your code uses routines from the IMSL library. If, when your VB program is run, the IMSL DLLs are not accessible through the PATH environment variable, the program will abort.
If RNSET and RNUN are the only IMSL routines that are needed, you could use the Fortran intrinsics RANDOM_SEED and RANDOM_NUMBER instead, and remove the dependency of your VB project on IMSL.
Please do not confuse yourself and readers by calling LINK_FNL_SHARED.H as a "library". That include file, which is all of 40 bytes in length, simply adds an OBJCOMMENT directive for the linker to use. The library itself is called imslmkl_dll.lib .
Adding a .lib to a VB project will not do anything useful.
VB will say "DLL not found" when a dependent DLL isn't found. If you have purchased IMSL, you'll need to make sure that its DLLs are in a folder included in the PATH system environment variable. You can contact Rogue Wave for support on IMSL.