TI中文支持网
TI专业的中文技术问题搜集分享网站

数学函数在fastmath67x.lib和 rts6740.lib 重复定义

我使用的编译环境是CCS5.2 ,在编译bios配置文件tcf后生成的cmd文件中连接了rts6740.lib,而我程序中同时使用了fastmath67x.lib中的一些数学函数。在link的时候提示重复定义了。

我在CCS3.3的时候是没有问题的。

noaming:

你好,具体是使用哪个函数时候提示重复定了,使用该函数库时,请注意下面的内容

To use the C67x FastMath library, specify it before the standard run-time-support library when linking yourprogram. For example:cl6x -mv6700 –run_linker myprogram.obj –library=lnk.cmd –library=fastmath67x.lib –library=rts6700.libIf you are using Code Composer Studio, include the C6700 FastMath library in your project, and ensure itappears before the standard run-time-support library in the Link Order tab in the Build Options dialog box.

yuan xie:

回复 noaming:

你好,有cos和sqrt函数。

我估计可能是这个原因。我在编译tcf文件后生成的cfg.cmd文件中找到-l“rts6740.lib ”,然后在我自己在项目里添加的cmd文件中有-l " fastmath67x.lib"。fastmath67x.lib在 rts6740.lib的后面。我想问下如果使得fastmath67x.lib在 rts6740.lib之前,编译连接cfg.cmd好像都是CCS自动的。

noaming:

回复 yuan xie:

你好,首先使用cos等数学函数,在工程include中/ccsv5/tools/compiler/c6000-7.47…../include 等自动带的有math.h头文件。你不用添加其他库就能使用,你试一下。

yuan xie:

回复 noaming:

cos等数学函数只是重复定义了,但是我还需要fastmath67x.lib里其他的函数呀,所以不能缺少fastmath67x.lib库。

关于前面所说的怎么改变两个lib的顺序呢?

noaming:

回复 yuan xie:

你自己的CMD文件是怎么写的,贴出看看?

noaming:

回复 yuan xie:

方便的话,把工程发过来我试一下。

noaming:

回复 yuan xie:

如图这个地方设置lib,不能更改连接lib的顺序吗?

yuan xie:

回复 noaming:

你好!test.txt是我自己的cmd文件,testcfg.txt是CCS编译bios得到的cmd文件,makefile.txt是编译器生成的makefile文件。

makefile文件中:

ORDERED_OBJS += \$(GEN_CMDS__FLAG) 

GEN_CMDS__FLAG就是指testcfg.txt文件

由makefile可见是先link rts6740.lib再link  fastmath67x.lib

noaming:

回复 yuan xie:

如上图所示,不要在CMD文件中添加lib,而是在工程属性中添加,并设置好先后顺序,再编译试试。

yuan xie:

回复 noaming:

但是关键rts6740.lib所在cmd文件时CCS自动带上的啊

赞(0)
未经允许不得转载:TI中文支持网 » 数学函数在fastmath67x.lib和 rts6740.lib 重复定义
分享到: 更多 (0)