> Yes, the correct switch for static libraries is:
> -Wl,--whole-archive -l(list of libraries) -Wl,--no-whole-archives

Library grouping is currently not supported by our build system. See also
https://bugreports.qt.io/browse/QBS-701

Another workaround for the problem would be, to add some dead code to any
application source file and reference the missing class. E.g. just a
function or method like

void UdpPrinterServer_dummy()
{
    UdpPrinterServer dummy;
}


As long as linktime garbage collection is off, this will create a reference
to UdpPrinterServer and keep UdpPrinterServer symbols while linking the
application binary. Quick and dirty, but You can easily hide it behind a macro.

However, the dynamic libary option sounds way cleaner and safer. Please keep
us informed.

Antwort per Email an