This is the mail archive of the
mailing list for the Cygwin project.
Thanks: Solved: DLLs
- To: Pontus Lidman <email@example.com>
- Subject: Thanks: Solved: DLLs
- From: Alexander Mader <firstname.lastname@example.org>
- Date: Tue, 06 Jul 1999 17:11:47 +0200
- CC: email@example.com, firstname.lastname@example.org
- Organization: KAPP GmbH & Co KG
- References: <Pine.LNX.3.96.990621131852.21184Aemail@example.com>
some days ago Pontus Lidman answered an email regarding
DLLs. Following the hints given in this answer and elsewhere in the
thread "variation on the .dll, .lib, .a theme (help!)" I was able to
solve the following problem:
Given an MS built application build a DLL loadable by this
application using GNU tools.
In this DLL call functions provided by the original
application in a DLL built using MS tools.
In other words the task was to build a DLL with a MS entry point, the
suitable calling convention, and resolved symbols from the
application's MS DLL.
Following Pontus' hint I declared my funtions for export as
__declspec(dllexport). This was not neccessary in MSVC -- something
somewhere must be fixing this. So the declaration reads something like
foo( < params > )
< body >
Following the hints of Takayuki Tamura I prepared the application's MS
DLLs to be linkable for my purposes. I produced an export definitions
file from the according .lib and used this with dlltool to get a .a
library. So for a pair MSNAME.LIB, MSNAME.DLL I had something like
echo "EXPORTS" > msname.def
nm --demangle --defined-only MSNAME.lib
|sed -n 's/^.* T //p' >> .def
dlltool --dllname MSNAME.DLL --def msname.def \
Now I could take the Makefile.nocyg from the example "How to make JNI
..." provided by Mumit Khan at
added the appropiate -L<mylibdir> and -lmsname and got a working DLL.
Thank you very much.
Alexander Mader <firstname.lastname@example.org>
Want to unsubscribe from this list?
Send a message to email@example.com