Subject: Re: NEED HELP: linking an exe with windows lib files
From: [email-masked] ("Mikey")

23 Apr 1997 08:33:16 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook Express 4.71.0544.0
Original-To: "Shankar Unni" <[email-masked]>
Original-Cc: "cygnus" <[email-masked]>
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE Engine V4.71.0544.0
Original-Sender: [email-masked]

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@_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@_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                                  [email-masked]
>Chromatic Research                            (408) 752-9488
>

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".