This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
电脑安装CCS版本Code Composer Studio 10.4.0,原工程在以前的电脑上编译成功,更换电脑后,编译时报错
Description Resource Path Location Type
#148 declaration is incompatible with "double atan(double)" (declared at line 333 of "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_20.2.5.LTS/include/math.h") .ccsproject /CarDrive line 90, external location: E:\1_production\5_LSMCU\2_software\EV03_FCT_XACS\CarDrive\public\motor_header\SubPrgInclude.h C/C++ Problem
图片
请问是什么原因?
两个电脑的编译器版本相同,具体问题描述如下:
E:\1_production\5_LSMCU\2_software\EV03_FCT_XACS\CarDrive\public\motor_header\SubPrgInclude.h", line 90: error #148: declaration is incompatible with "double atan(double)" (declared at line 333 of "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_20.2.5.LTS/include/math.h")
解决了,自定义的函数int atan(int x , int y)与math.h的库函数_CODE_ACCESS double atan(double x)定义不一致,将库函数屏蔽不用,用自定义的函数