Search code examples
visual-studiovisual-c++visual-studio-2005

How to set compiler flag in VS 2005?


How to set compiler flag (in my case -DWITH_OPENSSL) in Visual studio 2005? I am trying to find it in Project Properties-> Configuration Properties -> C/C++, but unsuccessfully.


Solution

  • I don't have Visual Studio 2005 with me but it should be the same with the latest version... Go to Project Properties-> Configuration Properties -> C/C++ -> Preprocessor.

    In the field Preprocessor Definitions, add WITH_OPENSSL in the existing definitions, separated by a ;. Don't add the switch, -D, Visual Studio will add it for you.