如何在eclipse中指定预处理指令? [英] How to specify a preprocessor directive in eclipse?

查看:98
本文介绍了如何在eclipse中指定预处理指令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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*/

请注意,这与管理makefile

推荐答案

文档指向C / C ++项目属性→路径和符号符号

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.

这篇关于如何在eclipse中指定预处理指令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆