OK, one thing that works is to build libLerc
https://github.com/Esri/lerc/tree/master
(which is the one throwing the error) manually and link the official msys libstdc++ statically to it and ship this library in the Geany installer instead of the msys one. I tried this manually without modifying the build scripts and Geany launches. So if there's not a better way, this could be one way forward.