Mail Archives: cygwin/1997/04/22/03:54:43
This is a multi-part message in MIME format.
------=_NextPart_000_01BC4EC1.EE8CF0C0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
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, enclosed is a script =
to 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=3Das -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" =3D x"" ];then
echo "shell script to generate .def files from .LIB files
$0 filename ..."
exit 0
else
for file in $*;do
=20
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=3D .text section R=3D readonly .data section (exported variables)
# $AA C AT _0 @@ exported structure/internal function definitions (nm's =
bust I think ;^)
=20
Come on gang...someone must know what to do about this... Help me out
here!
John A. Lewis wrote:
>
> I am trying to build an executable which links in some libraries which
> are intended for windows. The symbols in these libraries have the _ =
in
> front of them, which gcc seems to handle, and @4, @8, @12, etc. behind
> them, which gcc does not seem to handle. I am kind of a novice here, =
so
> I have no idea what to do about this.
>
> Any recommendations on how to fix this?
>
> Thanks,
> --John Lewis
------=_NextPart_000_01BC4EC1.EE8CF0C0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<HTML><HEAD><META content=3D"text/html; charset=3Diso-8859-1"=20
http-equiv=3DContent-Type>
<META content=3D'"Trident 4.71.0544.0"' name=3DGENERATOR>
</HEAD>
<BODY><FONT face=3DArial size=3D2>
<P><FONT face=3DSystem size=3D-1>You have 2 choices that I know of, use =
MS=20
link32.exe, or build .def files, and from that make a libname.a type =
library,=20
enclosed is a script to make .def files from .lib files, if You, or =
anyone else=20
who reads this has a copy of crtdll.lib, or oldnames.lib, please run =
this script=20
on it and post the resulting .def file back to the list or to Me =
;^).</FONT></P>
<P><FONT face=3DSystem size=3D-1>to make the library itself, run</FONT>
<P><FONT face=3DSystem size=3D-1>dlltool --as=3Das -k --dllname =
"name".dll=20
--output-lib "name".a --def "name".def</FONT>
<P><FONT face=3DSystem size=3D-1>where "name" is the name of =
the dll you=20
are linking to.</FONT>
<P><FONT face=3DSystem size=3D-1>#!/bin/sh<BR>
<BR>
tlow(){<BR>
echo $1|tr A-Z a-z<BR>
}<BR>
<BR>
if [ x"$1" =3D x"" ];then<BR>
echo "shell script to generate .def files from .LIB files<BR>
$0 filename ..."<BR>
exit 0<BR>
else<BR>
for file in $*;do<BR>
</FONT>
<P><FONT face=3DSystem size=3D-1>echo LIBRARY `basename $file .LIB` =
\<BR>
> `tlow \`basename $file .LIB\`.def`; \<BR>
echo EXPORTS >> `tlow \`basename $file .LIB\`.def`; \<BR>
nm --extern-only $file |egrep '^........ [TR]' \<BR>
|fgrep -v '\$AA C AT _0 @@' \<BR>
|sort \<BR>
|sed -e 's/[^_]*_//' \<BR>
-e 's/[^?]*?//' \<BR>
>> `tlow \`basename $file .LIB\`.def`;<BR>
done<BR>
fi<BR>
<BR>
# T=3D .text section R=3D readonly .data section (exported =
variables)<BR>
# $AA C AT _0 @@ exported structure/internal function definitions (nm's =
bust I=20
think ;^)<BR>
</FONT>
<P><FONT face=3DSystem size=3D-1></FONT><FONT face=3DSystem =
size=3D-1>Come on=20
gang...someone must know what to do about this... Help me out<BR>
here!<BR>
<BR>
John A. Lewis wrote:<BR>
><BR>
> I am trying to build an executable which links in some libraries =
which<BR>
> are intended for windows. The symbols in these libraries have =
the _=20
in<BR>
> front of them, which gcc seems to handle, and @4, @8, @12, etc. =
behind<BR>
> them, which gcc does not seem to handle. I am kind of a =
novice here,=20
so<BR>
> I have no idea what to do about this.<BR>
><BR>
> Any recommendations on how to fix this?<BR>
><BR>
> Thanks,<BR>
> --John Lewis</FONT></P>
</FONT>
</BODY></HTML>
------=_NextPart_000_01BC4EC1.EE8CF0C0--
-
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 -