[Qbs] cpp.runtimeLibrary:"static" under MSVC2013

Christian Kandeler christian.kandeler at qt.io
Wed Aug 22 16:45:58 CEST 2018


On Mon, 6 Aug 2018 16:45:09 +0300
Иван Комиссаров <abbapoh at gmail.com> wrote:

> Not sure if that helps, but i got same error with _shared_ linkage when
> library didn't exported any symbols due to incorrect defines passed to the
> linker (Q_DECL_EXPORT/Q_DECL_IMPORT); in that case linker doesn't create an
> empty .lib file (is that a QBS bug, btw?). 

This is an interesting question. The thing about MSVC is that it may or
may not create a .lib file, depending on whether symbols were exported
or not. Now, does it make sense to depend on a DynamicLibrary product
without using "cpp.link: false" if that library does not export any
symbols? Probably not, but since this continues to come as a surprise
to users (e.g. https://bugreports.qt.io/browse/QBS-1291), I suppose we should provide a better error message (i.e. don't wait for the linker to fail).
I'll take a look.


Christian



More information about the Qbs mailing list