CVF Compatibility

CVF Compatibility

Can I call routines from DLL's built with the Lahey/Fujitsu 95 compiler with CVF 6.1a?

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.


Retired 12/31/2016

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?

See if this previous thread helps.


Thanks, but 6.1a doesn't have a makilib utility.

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


Retired 12/31/2016

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?


"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:

   SUBROUTINE AnImportedRoutine(anArg, anotherArg)
   !DEC$ATTRIBUTES DLLIMPORT, ALIAS: "_animportedroutine@8":: AnImportedRoutine

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

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.


Leave a Comment

Please sign in to add a comment. Not a member? Join today