I'm not sure whether this is a joke answer or not.
It is not a joke (though it is of course wildly off-topic and for the
reasons often quoted here - which is that no one here can adequately
peer-review it, since they are all Unix bigots).
But here's the deal:
1) Since OP mentioned both .a files and DLLs, which are,
classically, creatures from different worlds, you have to
assume, as Jacob has done, that he (OP) is talking about
using a Unixy compiler in the Windows world. And, this
usually means either MinGW or Cygwin. Said Unixy compilers
end up speaking both the language of Unix (.a and .o files)
as well as the language of Windows (.EXEs and .DLLs).
2) Given the above, and, of course, assuming no access to source
(since that would make it trivial to simply re-compile from
scratch), the advice that Jacob gives is, modulo a detail
here or there (said details being, of course, in the dreaded
category known as "off topic"), correct.