Part Number:TMS320F280025
电脑安装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
图片
请问是什么原因?
Ben Qin:
你好,原电脑的编译器版本是什么?
,
user4678620:
ti-cgt-c2000_20.2.5.LTS
,
user4678620:
两个电脑的编译器版本相同,具体问题描述如下:
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")
,
Ben Qin:
能看下你的程序定位到的错误吗?
,
user4678620:
,
Ben Qin:
将int 改成double试一下。三个都要改。
,
user4678620:
试了,还是报同样的错误
,
Ben Qin:
如果是两个参数需要使用atan2函数。
,
user4678620:
解决了,自定义的函数int atan(int x , int y)与math.h的库函数_CODE_ACCESS double atan(double x)定义不一致,将库函数屏蔽不用,用自定义的函数