[QBS] setting windowsApiCharacterSet

罗勇刚(Yonggang Luo) luoyonggang at gmail.com
Mon Oct 28 10:36:21 CET 2013


That's weird, may be this is the cause of that:

    windowsApiCharacterSet: "unicode"
    platformDefines:
base.concat(Windows.characterSetDefines(windowsApiCharacterSet))


I dond't know if this
 base.concat(Windows.characterSetDefines(windowsApiCharacterSet)) will be
running multiple times, if there is only one time, then there won't be
problems.
Try to clean and re-run again.


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

> Am Montag, den 28.10.2013
> schrieb 罗勇刚(Yonggang Luo)  <luoyonggang at gmail.com>:
>
> Thank you for your answer.
>
> > \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
>
> I found this in the 1.0.1 docs:
>   Type: string
>   Allowed Values: "unicode", "mbcs", undefined
>   Default: "unicode"
> Is there a newer documentation around?
>
> >
> > use "mbcs" instead.
> >
>
> Using "mbcs" instead leads to the compiler call:
>
>   cl.exe ....  /D_MBCS /DUNICODE /D_UNICODE ...
>
> and does not suppress /DUNICODE.
>
> >
> > 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
> > >
> >
> >
> >
>
>
>
> --
> Mit freundlichen Grüßen
> Kurt Keller
>
> Parity Software GmbH     Tel: (49)7150/3785-0  kk at parity-software.com
> Stuttgarter Strasse 42/3 Fax: (49)7150/3785-70 www.parity-software.com
> D-71701 Schwieberdingen  GF:  Friedrich Benzing, Kurt Keller, Heinz Weiß
> Amtsgericht Ludwigsburg - HRB 1900 - Steuer-Nummer 71344/00043
>



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


More information about the Qbs mailing list