locked
Preprocessor directives _WINDOWS, _LIB, %(Preprocessor directives) RRS feed

  • Question

  • Hi,

    I started a static library project in VC++ 2010.

    In project properties under 'C++/Preprocessor' I have the line 'WIN32; _WINDOWS; _DEBUG; _LIB; %(Preprocessor Directives)'

    I understand WIN32 and _DEBUG, may be _LIB, but what means _WINDOWS and %(Preprocessor Directives)?

    In resulting compiler command line I see a lot of /Ds like /D "UNICODE", and others that are not in stdafx.h generated by the Prolect WIzard.

    Is that a result of _WINDOWS or %(..) directives or I may live without these preprocessor directives?

    Sunday, September 18, 2011 9:46 PM

Answers

  • Hi Geoyar,

    %(Preprocessor Directives) are inherited values, e.g. if you set the character set of the project to "Use Unicode Character Set", UNICODE and _UNICODE will be defined automatically.

    I hope this is helpful, happy coding...


    "It's time to kick ass and chew bubble gum... and I'm all outta gum." - Duke Nukem
    • Marked as answer by Geoyar Saturday, October 29, 2011 4:36 PM
    Saturday, October 29, 2011 3:25 PM

All replies

  • Hi Geoyar,

    %(Preprocessor Directives) are inherited values, e.g. if you set the character set of the project to "Use Unicode Character Set", UNICODE and _UNICODE will be defined automatically.

    I hope this is helpful, happy coding...


    "It's time to kick ass and chew bubble gum... and I'm all outta gum." - Duke Nukem
    • Marked as answer by Geoyar Saturday, October 29, 2011 4:36 PM
    Saturday, October 29, 2011 3:25 PM
  • Thanks!
    Saturday, October 29, 2011 4:37 PM