开发者

How to specify a preprocessor directive in eclipse?

开发者 https://www.devze.com 2023-01-17 05:38 出处:网络
How are preprocessor directives specified in eclipse for different configurati开发者_Go百科ons? For instance if I have multiple mains that should be run in different configurations and specify

How are preprocessor directives specified in eclipse for different configurati开发者_Go百科ons? 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号