For example, right-click the project in Solution Explorer, select "Properties", go to "C/C++", "Preprocessor", and define the required symbols in the "Preprocessor Definitions" fields. Make sure that you also select the appropriate (or "All") Configuration and Platform from comboboxes.
VS 2015 - Change C++ project whose preprocessor definitions are used
Peter Gaczi
26
Reputation points
VS 2015 - My solution contains 3 C++ projects.
The wrong code blocks are greyed out.
How can I change the C++ project whose preprocessor definitions are used in the text editor?
Thanks, P
2 answers
Sort by: Most helpful
-
-
Peter Gaczi 26 Reputation points
2022-01-23T15:27:52.28+00:00 The Answer -
If you have added a source or header file to two projects in your solution, it will be listed twice, once under each project in the Solution Explorer window.
The preprocessor definitions of the project whose list you have used to open the file will apply.
If you then mouse-click that file name under the other project, the preprocessor definitions of other project will obtain.