CW 10.3 Code analysis with command line defines

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CW 10.3 Code analysis with command line defines

跳至解决方案
1,529 次查看
mikestich
Contributor II

If types/code or whatever are switched in or out via a command line define (-d XXX in the project Properties->C/C++ Build->Settings->Language settitngs->Other flags) the IDE does not seem to recognize that that they are set.  It seems to assume they are not defined.  It works fine if they are set in an include file. Is there any way to get this to work correctly?

标签 (1)
1 解答
1,394 次查看
BlackNight
NXP Employee
NXP Employee

You need to define it throught the compiler > Preprocessor settings.

See

Compiler Defines and Eclipse Editor Highlighting | MCU on Eclipse

I hope this helps.

在原帖中查看解决方案

3 回复数
1,394 次查看
mikestich
Contributor II

But wait!  I went and actually looked in my project and there is a "Symbols" tab under the Paths and Symbols resource.  Moved all my -d defines there and all works great now, complete with appropriate highlighting in the editor.  Thanks much!

1,395 次查看
BlackNight
NXP Employee
NXP Employee

You need to define it throught the compiler > Preprocessor settings.

See

Compiler Defines and Eclipse Editor Highlighting | MCU on Eclipse

I hope this helps.

1,394 次查看
mikestich
Contributor II

Unfortunately I'm using the Freescale Coldfire. I have my defines set up exactly how the link you reference says I should. However, it says that the solution that works in other cases does not exist for that compiler.  Looks like I'm stuck with the Editor not knowing about the defines.  Thanks for the pointer.

0 项奖励
回复