Warnings about macros in project settings - how to improve?

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

Warnings about macros in project settings - how to improve?

跳至解决方案
2,051 次查看
mjbcswitzerland
Specialist V

Hi All

 

When moving projects created with CW10.2 to CW10.5 there are a warning when importing:


"References to the ${workspace_loc:<resource>} macro were found in the project settings. Using this macro could cause unexpected errors when the resource is not open or available in the workspace. Using the ${ProjDirPath} macro is preferable."

- followed by a list of project or target references.

 

I wanted to clean up the project so that these warning are no longer shown (otherwise other users of the projects report that there must be a problem with them) but couldn't find any such macros used in path variables or elsewhere.

 

Does anyone know what can be done to adjust a project accordingly?

 

Regards

 

Mark

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

Hi Mark,

I would check the compiler settings (include search paths, etc) where these kind of macros might be used.

Otherwise: open the .project and .cproject files in a text editor and search for that macro: then either change it in the file directly, or this gives you a hint where in the settings that macro is used.

I hope this helps.

在原帖中查看解决方案

3 回复数
1,689 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Mark:

Did you look at the include directories?

Go to Project -> Properties -> C/C++ General -> Paths and Symbols, and verify that none of the include directories for assembly or C languages is pointing to the workspace.

Regards!

Jorge Gonzalez

1,690 次查看
BlackNight
NXP Employee
NXP Employee

Hi Mark,

I would check the compiler settings (include search paths, etc) where these kind of macros might be used.

Otherwise: open the .project and .cproject files in a text editor and search for that macro: then either change it in the file directly, or this gives you a hint where in the settings that macro is used.

I hope this helps.

1,689 次查看
mjbcswitzerland
Specialist V

Hi Eric

Thanks - it was indeed in the compiler include path.

In each project I modified the include path from

"${workspace_loc:/Project/Applications/Target}"

to

"${ProjDirPath}/Applications/Target"

and then CW was happy again.

Regards

Mark