Assume you have both of these libs in one folder (which is often the case). You would be unable to address the ".dll" import lib if you remove the DLL automagically. The linker would always pick the static lib.
Ok, Let me explain:
If I have both two libraries libfoo.dll.a (dynamic import library) and libfoo.a(static library) in the same folder.
Then, if user put "libfoo.dll.a" in the C::B linker library input control, then it generate "-lfoo.dll" command, the ld/gcc pick "libfoo.dll.a" as the third rule below, here "xxx" = "foo.dll"
libxxx.dll.a
xxx.dll.a
libxxx.a
cygxxx.dll (*)
libxxx.dll
xxx.dll
If the user put "libfoo.a" in the C::B library input control, it generate "-lfoo", and follow the rule, it pick "libfoo.dll.a" as it is the first rule, here here "xxx" = "foo",
But in this case, the user just want to link to static library?