Adam
Adam

Reputation: 3795

How to specify a preprocessor directive in eclipse?

How are preprocessor directives specified in eclipse for different configurations? For instance if I have multiple mains that should be run in different configurations and specify

#ifdef Problem1
//main func
#endif /*Problem1*/

Note that this is with managed makefiles

Upvotes: 7

Views: 12108

Answers (1)

Georg Fritzsche
Georg Fritzsche

Reputation: 99074

The documentation points to "C/C++ Project Properties""Paths and Symbols""Symbols".

However, usually it is better to use different source files for different configurations/architectures/... instead of extensive preprocessor usage.

Upvotes: 9

Related Questions