Include head file mistake??

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

Include head file mistake??

943 次查看
peteyo
Contributor II

Hi, 

I'm using S12XEP100 with codewarrior IDE v5.9.0.

 

In general, we set classes, functions and contants.... to a special color in IDE preferences. 

My question is: 

I define a const. in system.c, but the color of const. stays in black after I compile the project.

does this issue cause by include??

by the way, can I put all include head file (#include xxx.h ) in same head file(for example CONFIG.h )

and then put '#include CONFIG.h' in every other head file??

 

in system.c:

#include system.h

#define HIGH_LEVEL 100

...

...

in system.h:

#ifndef __SYSTEM_H
#define __SYSTEM_H
#include <MC9S12XEP100.h>
#include <hidef.h>
#include "PE_Types.h"
#include "CONFIG.h"

...

...

标签 (1)
0 项奖励
回复
1 回复

851 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Peter,

1) Yes, you can include all file into one head file . You can test , then build ,

check whether there is error.

2) About the const color , on my side ,it also the same with yours ,it maybe  a bug ,

i well reflect it to CW team and then tell you the result .ASAP.

Hope it helps

ALice

0 项奖励
回复