Using vs2010 and IVF2013
Using Fortran I can call a C routine from a C dll to call a C routine from a static library.
I would like to bypass creating a C dll and call the routine from the static library directly. When I try I get the following error:
Use_Log.obj : error LNK2019: unresolved external symbol __imp___CusageWebLog referenced in function USE_LOG
The Fortran calling routine is USE_LOG.
This is the interface block written in the same format I would use to call the routine from a C dll.
INTEGER FUNCTION CusageWebLog(server, port, script, application, log, message)
!DEC$ ATTRIBUTES DLLIMPORT :: CUSAGEWEBLOG
!DEC$ ATTRIBUTES DECORATE, ALIAS:'_CusageWebLog' :: CUSAGEWEBLOG
CHARACTER(LEN=50) :: server
INTEGER(KIND=2) :: port
CHARACTER(LEN=50) :: script
CHARACTER(LEN=50) :: application
CHARACTER(LEN=100) :: log
CHARACTER(LEN=50) :: message
!DEC$ ATTRIBUTES REFERENCE :: server, script, application, log, message
END FUNCTION CUSAGEWEBLOG
Using Dumpbin to view the static library cusage.lib shows the following info for the routine CusageWebLog which I'm trying to use:
Dump of file cusage.lib
File Type: LIBRARY
COFF SYMBOL TABLE
03C 00000000 SECT10 notype () External | _CusageWebLog
Since I'm trying to get the routine from a static library instead of an import library, is the format used for calling it different?