Can you build a standard windows DLL with mingw ?
Yes you can :-P I am using DEV-C++ and it can do all the setup stuff reqired to make a DLL. (It uses mingw for compiling).
Maybe you need a postprocessing tool that converts your mingw object file into a proper windows DLL.
There are some tools called dllwrap and dlltool that will create a DLL for you. You can add options to the compiler that creates a .DEF file which can be combined with the object file into a DLL. In this .DEF file I can actually see the exported fuction's name (foo_setup), but the funciton doesn't seem to be available to PD.
Could it be that the DLL is not binary compatible in some way?
Well, I'll keep digging.
Cheers Soeren