expression syntax error

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

expression syntax error

跳至解决方案
3,745 次查看
kdavis
Contributor III

Hi everyone, sorry if this is an apparent question that I just am missing, I am using Codewarrior v10.2 and I am having some problems compiling. My target is a MCF54418, and I started this project from a sample mqx project which built fine.

 

Nearly everyline is returning an error 'expression syntax error'. The project also is saying that files cannot be opened, for example I have a c file and header, both in the project, and the C file says the header can't be opened though its in the project and I can open it. Again, sorry if this is obvious but I do not know what is happening.

 

 

Thank you in advance,

Kevin

 

标签 (1)
0 项奖励
回复
1 解答
2,486 次查看
CrasyCat
Specialist III

Hello

1- Cannot find Header file

    Where is the header file located on your disk?

    Is it located in the same folder as the source file?

    If this is the case, you need to add the path to your .h file to the User path.

    This is done as follows:

  • Click right on the project name in the CodeWarrior Project view
  • Select Properties.
  • Switch to C/C++ Build > Settings > ColdFire Compiler > Input page.
  • Click on the first icon to the left after User Path.
  • Specify the path to your .h file. If it is located in your project's Sources sub-directory, specify  "${ProjDirPath}\Sources" there.
  • Click on OK to save the changes

2- Error 'expression syntax error'

  For this one it might be interesting to look at the preprocessing listing file.

  • Open the source file in an edit window
  • Click right inside of the window
  • Select Preprocess. A new windows opens displaying the preprocessor listing.
  • Check content of ths file. All macros and header files are expanded here so it might be easier to catch what is not working.

CrasyCat

在原帖中查看解决方案

0 项奖励
回复
2 回复数
2,487 次查看
CrasyCat
Specialist III

Hello

1- Cannot find Header file

    Where is the header file located on your disk?

    Is it located in the same folder as the source file?

    If this is the case, you need to add the path to your .h file to the User path.

    This is done as follows:

  • Click right on the project name in the CodeWarrior Project view
  • Select Properties.
  • Switch to C/C++ Build > Settings > ColdFire Compiler > Input page.
  • Click on the first icon to the left after User Path.
  • Specify the path to your .h file. If it is located in your project's Sources sub-directory, specify  "${ProjDirPath}\Sources" there.
  • Click on OK to save the changes

2- Error 'expression syntax error'

  For this one it might be interesting to look at the preprocessing listing file.

  • Open the source file in an edit window
  • Click right inside of the window
  • Select Preprocess. A new windows opens displaying the preprocessor listing.
  • Check content of ths file. All macros and header files are expanded here so it might be easier to catch what is not working.

CrasyCat

0 项奖励
回复
2,486 次查看
kdavis
Contributor III

Thank you so much, I thought I had added it to the path, but I guess not. And I did not know about the preprocess listing, that helped me identify what was happening.

0 项奖励
回复