- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can I call routines from DLL's built with the Lahey/Fujitsu 95 compiler with CVF 6.1a?
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, but 6.1a doesn't have a makilib utility.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"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:
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
makilib hasn't shipped with any CVF version. You can get it here. Here's the instructions:
Steve
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
.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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Jugoslav
![](/skins/images/97EBD289F799093125F556C07FADEBA3/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page