In my case to make extra sure I exported a dummy global symbol from the dll. If I don't do anything with it - nothing works. If I print it with qDebug() in the application code, the library is loaded and registration code and all works just as expected.

Indeed. And instead of the dummy symbol you can just use the existing type registration function for that. As you've found out, "just store it" is not enough. You have to "do" something with it. Sorry for being inaccurate there.

The way we work around the issue in the generated plugin code is storing it in a volatile pointer. That's terrible and also not guaranteed to work, but it works in practice on all compilers we support. If you figure out a better way, please let me know.

best regards,
Ulf
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to