[QBS] Newbie to QBS

Jake Petroules jake.petroules at petroules.com
Tue May 13 01:41:50 CEST 2014

Hi Olivier,

This mailing list and #qt-qbs on Freenode (IRC) are indeed the right places to ask for information on qbs. I've answered your questions inline.

On 2014-05-12, at 05:56 PM, olivier musse <olivier.musse at sfr.fr> wrote:

> Hi everybody,
> First sorry if this is not the right place for getting informations but 
> after many hours looking on Internet I did not found what I need.
> Working with qmake for many years, i just tried QBS last month and found 
> it really efficient on many points compared to qmake (dependency between 
> library).
> However, QBS is missing documentation on specific points I need.
> So may I asked for help on this list.
> If yes as a first start two questions :
> - how to add a .def file to a dynamiclibrary under windows (visual 
> compiler)as done with DEF_FILE directive in qmake

After briefly reviewing the documentation, it looks like you should be able to simply specify cpp.linkerFlags: ["/DEF:" + defFilename] in your product. We may add a property to make this easier (https://bugreports.qt-project.org/browse/QBS-571).

> - how to build a project using /MD directive (visual compiler). I tryed 
> to add cxxFlag to cpp module but got a warning saying that /MT is 
> overiding /MD

You don't need to add the /MD switch as it's already added automatically by qbs. I'm not sure if you meant to say that you wanted to use /MT, but if that's the case it's currently not possible to specify the static runtime library (though if /MT overrides /MD, you can exploit that in the meantime). I've added an issue to our bug tracker for us to fix this (https://bugreports.qt-project.org/browse/QBS-570).

> Many thanks in advance for help.
> Regards
> Olivier
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs

Jake Petroules - jake.petroules at petroules.com
Chief Technology Officer - Petroules Corporation

More information about the Qbs mailing list