Hi, I was using a second handed code which needs to call IMSL library. In the original code, it was written like
Within my current ivf + vs2013 combination, I change this into INCLUDE 'link_fnl_static.h'
And there are two IMSL functions are used in my code, DNORDF and RNUNF respectively. When I built the project in VS, the compiler threw the error message
1>C:\Users\zhanglu\Desktop\computational macroeconomics\endogenous grid method\Barillas&JVF's EGM code\sub_tauchen.f90(38): error #6404: This name does not have a type, and must have an explicit type. [DNORDF] 1>compilation aborted for C:\Users\zhanglu\Desktop\computational macroeconomics\endogenous grid method\Barillas&JVF's EGM code\sub_tauchen.f90 (code 1)
and same error for RNUNF.
But I have defined the variable. So the problem is very likely stem from how I call the IMSL library. So do I miss something? Thank you for your advice.
Could you show us the code? What is the contents of that include file?
The module defines all the interfaces for the various public routines, I would guess that the file that you include simply is incomplete wrt these two functions.
It also raises the question: why replace the use statement?
You are caught between the use of old names such as DNORDF and new names such as D_ANORDF. The INCLUDE 'link_fnl_static.h' statement pertains only to making sure that the linker searches the relevant IMSL libraries, whereas you need USE statements for the compiler to get the correct types and interfaces.
You could add a USE ANORDF_INT statement, and change DNORDF to D_ANORDF in your sources. Or, you could add a USE NUMERICAL_LIBRARIES statement, but that may slow down compilations a bit.
Alternatively, if you want to call the old names, simply declare the function DNORDF to be of type double precision.
Arjen: Why change the USE statement? There is no MSIMSL.mod in the Intel IMSL package. Vendors such as MS and Intel who repackage IMSL with their compilers usually make minor modifications to make it easier to use IMSL with their specific compiler. An undesirable side-effect is that such modifications may make it more difficult or impossible to use the library with a compiler from a different vendor.
Thanks, @mecej4, adding USE ANORDF_INT statement help me solve the type problem. However, during the linking process, another "unresolved external symbol " emerged. I open another thread https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/720854, can you take a look? Really appreciate it.