delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/06/09/08:09:34

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Date: Wed, 9 Jun 1999 14:13:52 +0200 (CEST)
From: Pontus Lidman <pontus AT mathcore DOT com>
X-Sender: pontus AT atlas DOT mathcore DOT se
To: cygwin AT sourceware DOT cygnus DOT com
Subject: variation on the .dll, .lib, .a theme (help!)
Message-ID: <Pine.LNX.4.05.9906091204290.30377-100000@atlas.mathcore.se>
MIME-Version: 1.0
Sender: Pontus Lidman <pontus AT mathcore DOT se>

Hello,

I've seen many questions on linking with MS libs answered here, but I
haven't been able to apply the solutions to my particular problem. I've
also scanned the FAQ and read Mumit Khan's egcs page. I've been working at
my problem for several days now.

I'm trying to use the mingw32 applications and libs to compile a program
and link with a library supplied with the Windows version of Mathematica.
I'm using Cygwin32 B20 and the egcs/mingw32 in egcs-1.1.2-mingw32.zip from
Khan's site.

The library in question is a .lib of many .dll's, all of the same name.
Thus I can't use LIB.EXE or 'ar' to extract them. I can however use the
following script to create a .def and then build a .a file (as suggested
in a previous post):

cp ml32i1m.lib ML.lib
echo "EXPORTS" >ML.def
nm --demangle --defined-only ML.lib | grep ' T ' | sed 's/.* T //' >>ML.def
dlltool --dllname ML.lib --def ML.def --output-lib libML.a

ml32i1m.lib is the MS library I want to use; this script results in a
libML.a to use with egcs.

My application compiles and links without any errors, but when I run it, I
get a message saying that "The dynamic library ML.lib could not be found
in the specified path". If I try to copy the original .lib to the working
directory (renamed to ML.lib), I get "The application or DLL ML.lib is not
a valid Windows NT image...".

I'm confused. Can anybody help?

Regards,

Pontus Lidman




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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