From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tor Lillqvist To: DJ Delorie Cc: cygwin@sourceware.cygnus.com Subject: Re: How can I get a .dll to resolve at runtime ? Date: Wed, 07 Jul 1999 16:13:00 -0000 Message-id: <14211.57334.420000.479849@tippen> References: <3783C923.C7742C50@olf.com> <199907072246.SAA07598@indy.delorie.com> X-SW-Source: 1999-07/msg00149.html DJ Delorie writes: > One thing to try is to export the function with a .DEF file, and see > if that works. You'd have to build an import library for your > executable and link the dll against that, but I'm not sure if NT would > even *allow* such a hack. Yes, it works quite well (on Win9x at least). You can specify a .def file when building an .exe with CL (or LINK), and it produces an import .LIB. With gcc -mno-cygwin it's quite a bit more convoluted, but it's possible. I came to the conclusion that with gcc you must mark the exported functions with __declspec(dllexport), the .def file is ignored. (And you must do the dance with multiple gcc and dlltool passes.) I might be wrong... --tml -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tor Lillqvist To: DJ Delorie Cc: cygwin@sourceware.cygnus.com Subject: Re: How can I get a .dll to resolve at runtime ? Date: Sat, 31 Jul 1999 18:34:00 -0000 Message-ID: <14211.57334.420000.479849@tippen> References: <3783C923.C7742C50@olf.com> <199907072246.SAA07598@indy.delorie.com> X-SW-Source: 1999-07n/msg00149.html Message-ID: <19990731183400.Snucx7ZXMOa5FuDywfmrCBGGU8FmRJu8XcQXD2Io9RI@z> DJ Delorie writes: > One thing to try is to export the function with a .DEF file, and see > if that works. You'd have to build an import library for your > executable and link the dll against that, but I'm not sure if NT would > even *allow* such a hack. Yes, it works quite well (on Win9x at least). You can specify a .def file when building an .exe with CL (or LINK), and it produces an import .LIB. With gcc -mno-cygwin it's quite a bit more convoluted, but it's possible. I came to the conclusion that with gcc you must mark the exported functions with __declspec(dllexport), the .def file is ignored. (And you must do the dance with multiple gcc and dlltool passes.) I might be wrong... --tml -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com