[QBS] setting windowsApiCharacterSet

罗勇刚(Yonggang Luo) luoyonggang at gmail.com
Mon Oct 28 09:54:45 CET 2013


\section2 windowsApiCharacterSet

    \table
    \row    \li \b{Type:}            \li \c{string}
    \row    \li \b{Allowed Values:}  \li \c{"unicode"}, \c{"mbcs"},
\c{undefined}
    \row    \li \b{Default:}         \li \c{"unicode"}
    \endtable


use "mbcs" instead.


2013/10/28 Kurt Keller <kk at parity-software.com>

> Hi all,
>
> when I have a simple project (which only depends on the 'cpp' module) I
> can set windowsApiCharacterSet:undefined to get rid of the /DUNICODE and
> /D_UNICODE defines on windows.
>
> But this does not work if there is an additional dependency to a other
> module, which depends itself on 'cpp':
>
> ------------------- main.qbs
> import qbs 1.0
> Application {
>   ...
>   Depends { name: 'cpp' }
>   Depends { name: 'myModule' }
>
>   cpp.windowsApiCharacterSet: undefined
>   ...
> }
>
> ------------------- myModule.qbs
> import qbs 1.0
> Module {
>   Depends { name: 'cpp' }
>   ... // no further references to windowsApiCharacterSet here
> }
>
> In this example qbs generates compiler calls with \D_UNICODE and
> \DUNICODE set. I can stop this only by inserting
>
>   myModule.cpp.windowsApiCharacterSet: undefined
>
> into the Application { ... } block.
>
> What am I missing? Imho this is very impractical, because the writer of
> the main QBS File must know the internals of myModule to specify compiler
> flags correctly.
>
> Is there a method to undefine or to unset compiler defines globally?
>
>
> --
> Best regards
> Kurt Keller
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>



-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20131028/4c9b3ae6/attachment.html>


More information about the Qbs mailing list