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

CVF Compatibility

jello62
Beginner
948 Views
Can I call routines from DLL's built with the Lahey/Fujitsu 95 compiler with CVF 6.1a?
0 Kudos
9 Replies
Steven_L_Intel1
Employee
948 Views
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
0 Kudos
jello62
Beginner
948 Views
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?
0 Kudos
james1
Beginner
948 Views
See if this previous thread helps.

James
0 Kudos
jello62
Beginner
948 Views
Thanks, but 6.1a doesn't have a makilib utility.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
948 Views
"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
0 Kudos
Steven_L_Intel1
Employee
948 Views
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
0 Kudos
tiborkibedi
Beginner
948 Views
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
0 Kudos
durisinm
Novice
948 Views
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
0 Kudos
Jugoslav_Dujic
Valued Contributor II
948 Views
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
0 Kudos
Reply