https://bugs.winehq.org/show_bug.cgi?id=49033
--- Comment #5 from Dominik Reichardt winehq-bugzilla@reichardt.de --- Ended up with $(CXX) $(LDFLAGS) -shared -o $@ $(filter-out $<,$^) --def $< -static -lstdc++ -Wl,--add-stdcall-alias -Wl,--dynamicbase and now the dll is correct and our installer runs.
So, this bug report can probably be closed.
Thanks a lot Piotr, your comments lead us on the right path and we were able to fix it.