Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

CVF Compatibility

jello62
Principiante
2.063 Visualizações
Can I call routines from DLL's built with the Lahey/Fujitsu 95 compiler with CVF 6.1a?
0 Kudos
9 Respostas
Steven_L_Intel1
Funcionário
2.063 Visualizações
DLLs are self-contained and rarely have any dependency on the compiler used to compile the caller. Just be sure you have the calling and naming conventions right.

Steve
jello62
Principiante
2.063 Visualizações
I can't link in the library that is created by the LF95 compiler. I get "unresolved external symbol" errors for the DLL routines. Does CVF 6.1a have a utility to generate the library file from the DLL?
james1
Principiante
2.063 Visualizações
See if this previous thread helps.

James
jello62
Principiante
2.063 Visualizações
Thanks, but 6.1a doesn't have a makilib utility.
Jugoslav_Dujic
Contribuidor valorado II
2.063 Visualizações
"Unresolved external symbols" don't necessarily indicate bad library -- you'd rather get something like "Corrupted file". Better, use the following algorithm:

- Use dumpbin /exports mydll.dll to get list of exported function names. Case and decoration do matter.

- Create a header file (module or include file) with INTERFACEs for used routines; use DLLIMPORT and ALIAS directives to match naming, i.e:
INTERFACE
   SUBROUTINE AnImportedRoutine(anArg, anotherArg)
   !DEC$ATTRIBUTES DLLIMPORT, ALIAS: "_animportedroutine@8":: AnImportedRoutine
   ...
END INTERFACE
Steven_L_Intel1
Funcionário
2.063 Visualizações
makilib hasn't shipped with any CVF version. You can get it here. Here's the instructions:
MAKILIB.EXE is a small program that can make import libraries from
a bare DLL. It handles exported procedures (routines) but will
probably not handle exported data or constants correctly. Fortunately,
most DLLs don't export data or constants.

  Usage is: MAKILIB [-sw -sw] filespec [filespec...]

  Switches are:
    m    Make an import library [default unless -e is used]
    e    List exports from DLL
    r    Show DLL export header information
    l    Toggle logging of operations (normally on)
    k    Only search in current directory for file
    s    Iterate over subdirectories
    v    Display program version information
    ?    Display this help message

Steve
tiborkibedi
Principiante
2.063 Visualizações
I`d like to link a CVF Fortran Console application with a Fortran library, LANLSF.LIB, distributed with the Poisson Superfish program package. This library was created with Lahey FORTRAN LF90 compiler. Using CVF6.6b, the following error observed:

.LANLSF.LIB : fatal error LNK1136: invalid or corrupt file

Using the DUMPBIN utility gives the following:

C:LANLDeveloperFiles>dumpbin /linkermember lanlsf.lib
Microsoft COFF Binary File Dumper Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.


Dump of file lanlsf.lib
lanlsf.lib : warning LNK4048: Invalid format file; ignored

Does these mean, that the lanlsf.lib file is corrupted? Or a library file created with Lahey compiler is not compatible with CVF?


Tibor Kibedi
ANU, Canberra
durisinm
Novato
2.063 Visualizações
Are the tools like MAKILIB.EXE that still reside on Compaq/HP Web and ftp sites going to be moved over to Intel's Web site?

Mike
Jugoslav_Dujic
Contribuidor valorado II
2.063 Visualizações
Looks as if the file was corrupted. Even if it is incompatible (OMF format), LINK will try to convert it to COFF format first and issue LNK1123 if it fails, not LNK1136.

Jugoslav
Responder