This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

variation on the .dll, .lib, .a theme (help!)


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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]