Subject: Usage of dll created in cygwin in VC++
From: [email-masked] (S. Krishnaprasad)

19 Jan 1999 12:11:53 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_000C_01BC061E.48EDC9A0"
To: "cygwin" <[email-masked]>

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01BC061E.48EDC9A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have used=20
dllwrap --export-all mdll.dll mylib.a -L. -lgmp

I get the DLL file.
But when I try to use it in a Visual C++ application it gives me a =
undefined reference to the function
names defined in this DLL.
I created a export .DEF file which is as follows

LIBRARY <dllname>
EXPORTS

    function1
    function2

etc..

Then I created a import file  .lib using

dllwrap --dllname <name.dll> --output-lib <libname.lib>

This created a .lib file
This when linked into a Visual C++ application it compiles and links =
properly but when
I try to run this application it just terminates at the function call.

Can anybody help me.

------=_NextPart_000_000C_01BC061E.48EDC9A0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>I have used </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>dllwrap --export-all mdll.dll =
mylib.a -L.=20
-lgmp</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>I get the DLL file.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>But when I try to use it in a Visual =
C++=20
application it gives me a undefined reference to the =
function</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>names defined in this =
DLL.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>I created a export .DEF file which =
is as=20
follows</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>LIBRARY &lt;dllname&gt;</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>EXPORTS</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; =
function1</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; =
function2</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>etc..</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Then I created a import file&nbsp; =
..lib=20
using</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>dllwrap --dllname &lt;name.dll&gt; =
--output-lib=20
&lt;libname.lib&gt;</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>This created a .lib =
file</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>This when linked into a Visual C++ =
application=20
it compiles and links properly but when</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>I try to run this application it =
just terminates=20
at the function call.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Can anybody help me.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000C_01BC061E.48EDC9A0--

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