If I understand you correctly, that will compile the files as seperate relocatable objects, and link them with perl.
The idea of my code is that the DLL is "injected" into another process, which is probably non-perl. This is done by waving a magic wand and sacrificing a goat (but not necessarily in that order). The DLL has to be a discrete executable in order for the alien process to run it.
Thanks anyway.