delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/27/15:16:24

From: mualem AT mnhepw DOT hep DOT umn DOT edu (Leon Mualem)
Subject: linking with .lib converted to .a
27 Jan 1999 15:16:24 -0800 :
Message-ID: <36AF3EB1.6576A440.cygnus.gnu-win32@mnhepw.hep.umn.edu>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hi,

I am trying to use a large set of libraries that are in .lib format
compiled
for NT on intel from fortran source code.  I believe the compiler was MS
powerstation.
(I have also tried with the successor, Digital Visual Fortran, with no
luck.)
I am doing this under B20.1 of the cygnus cygwin environment.
I believe I have managed to convert the .lib to a .a.  I used nm along
with grep and sed
commands to make an EXPORTS, .def file.  I then used dlltool to convert
the .lib to
a .a.  I think I did this correctly, specifying the .lib file as the
argument of 
--dllname.  dlltool is version 2.9.4 according to dlltool -V.  The new
..a has the 
right routine names, and links fine with both a fortran and c program. 
The relevant
versions of g77 and gcc are egcs 2.91.57, g77 FSF 0.5.24, and gcc - egcs
2.91.57,
and ld version 2.9.4 with BFD 2.9.4, supported emulations: i386pe.  

Everything links fine, as far as I can tell, but when I run the program,
I get
"The applicaton or DLL" ...x.lib (it has the correct path) "is not a
valid 
Windows NT image.  Please check against you installation diskette."

Is the problem that it is a .lib, and not a dll? 
I found several other references to this in the the archives, but many
of them 
are very old, 1997.  I did not find any real solutions listed.  Has
anyone done
this? 

Thank you for any help.
Also, if I can supply any more information, I would be more than
happy to.

Leon
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019