delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/23/08:33:16

From: jeffdb AT netzone DOT com ("Mikey")
Subject: Re: NEED HELP: linking an exe with windows lib files
23 Apr 1997 08:33:16 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199704231012.DAA03145.cygnus.gnu-win32@nz1.netzone.com>
Mime-Version: 1.0
X-Mailer: Microsoft Outlook Express 4.71.0544.0
Original-To: "Shankar Unni" <shankar AT chromatic DOT com>
Original-Cc: "cygnus" <gnu-win32 AT cygnus DOT com>
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE Engine V4.71.0544.0
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Sorry, I just washed ie4.0, and I can't do a thing with it ;^)

but this one should be right.

>> to John Lewis

You have 2 choices that I know of, use MS link32.exe, or build .def files,
and from that make a libname.a type library, inclosed is a script ot make
..def files from .lib files, if You, or anyone else who reads this has a
copy of crtdll.lib, or oldnames.lib, please run this script on it and post
the resulting .def file back to the list or to Me ;^).

to make the library itself, run

dlltool --as=as -k --dllname "name".dll --output-lib "name".a --def
"name".def

where name is the name of the dll you are linking to.

#!/bin/sh

tlow(){
echo $1|tr A-Z a-z
}

if [ x"$1" = x"" ];then
  echo "shell script to generate .def files from .LIB files
  $0 filename ..."
  exit 0
else
  for file in $*;do
      echo LIBRARY `basename $file .LIB` \
> `tlow \`basename $file .LIB\`.def`; \
echo EXPORTS >> `tlow \`basename $file .LIB\`.def`; \
nm --extern-only $file |egrep '^........ [TR]' \
|fgrep -v '\$AA C AT _0 @@' \
|sort \
|sed -e 's/[^_]*_//' \
     -e 's/[^?]*?//' \
  >> `tlow \`basename $file .LIB\`.def`;
done
fi

# T= .text section R= readonly .data section (exported variables)
# $AA C AT _0 @@ exported structure/C++ function definitions (Micros*** wierd
C++ name mangeling bust)


>Mikey wrote:
>
>[ A Mime-encapsulated message with teeny, tiny font specs, and the like
>]
>
>Err, Mikey: could you please not send HTML mail to the mailing list?
>Many of us use dumb mailers to read this stuff, and the HTML crap makes
>it nearly impossible to read.
>
>Plus, even the HTML that you sent is rather nasty, with embedded font
>specs that force the font to a tiny, nearly unreadable size on high-res
>displays. I have no idea what mail agent you're using, but it should be
>possible to either disable HTML mail, or set your point size to
>something reasonable (i.e. don't embed any font size specs in the HTML
>at all).
>--
>Shankar Unni                                  shankar AT chromatic DOT com
>Chromatic Research                            (408) 752-9488
>




-
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