header file

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

header file

570 次查看
grt951
Contributor II

I am using codewarrior ver.6.3 for the MCF51JE256 and when I compile all the errors say the header file cannot be opened. The interesting thing is this only happens on one PC when I move to another PC the errors go away. 

 

Any ideas?

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

366 次查看
TomE
Specialist II

1 - What header file?

 

2 - Reinstall CW on the failing machine.

 

3 - The CW forum might be better for these questions.

 

Tom

 

0 项奖励

366 次查看
sebasira
Senior Contributor I

Maybe the path to the header file is not the same in both PC.

 

For example, one is in:;

C:\My Dir\My Files\header.h

 

and in the other in

D:\My Dir\My Files\header.h

0 项奖励

366 次查看
TomE
Specialist II

This looks like a very basic C language usage problem, nothing specific to ColdFire CPUs (the purpose of this Forum) or even the Development Environment.

 

You should never have absolute paths in either "$include" directives in the C code or in wherever the Project lets you specify things. You should only have "raw file names" in the source files, and then set up the Project or Makefiles to specify which directories the compiler should look in (and in what order) to find the header files for each file or set of source files. And those directory specifications should be relative to the base directory of the project.

 

Tom

 

0 项奖励