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

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

问题描述

如何在eclipse中为不同的配置指定预处理器指令?例如,如果我有多个电源应该运行在不同的配置,并指定

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

makefiles


解决方案

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

但是,通常最好对不同的配置/架构/ ...使用不同的源文件,广泛的预处理器使用。


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

解决方案

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天全站免登陆