I think you are on to something because reinstalling (and upgrading) the IDE to Version 1.8.16 changed nothing. I still get the linking error. Even the basic blink.ino in the example sketches.
But- when I select the Uno in tools, no problem. Switch back to the Wemos D1 Mini and the problem reappears.
I went to the boards manager and reinstalled a prior version (3.0.2 to 3.0.1), and the problem went away.