I spent some time yesterday downloading and experimenting with the
Bloodshed Dev C++ compiler to create Windows external libraries and
came up with this:
Yes, it can be done. There are a couple of undocumented options you
need to set in order to do this. The Bloodshed help file seems fairly
useless (where have I heard this before?) but perusing the online gcc
documentation with Google gave better, if painstaking, results for the
command-line options. There may be #pragmas for some of these things
but I haven't found them.
Include your source file and XCmdGlue.c.
Under Project | Project Options select the "Parameters" tab.
Then in the Linker window you will want to have just these two
-def myDLL.def <or whatever the name of your def file is>