https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92359
--- Comment #4 from Bence Szabó <sbence92 at gmail dot com> --- >That should not matter in even in shared libraries unless you are doing some >symbol hidding in the shared library really. Hmm. I just run the attached example on linux (after some tuning) with -fPIC, and it works. Strange. Now I don't see why this shouldn't work under windows.