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.

在ccs5.21 使用#include "stdlib.h“,无法生成.out;编译也不报错

Other Parts Discussed in Thread: CONTROLSUITE

在CCS5.21中,使用#include "stdlib.h" ,编译报错;在"Project"  - “properties”  - “Include Option”中,添加了 "${workspace_loc:/${ProjName}/lib/IQmath.lib}"

再编译不会报错和警告,但不能生成.OUT,无任何提示。

  • 在#include <stdlib.h>  语句前,有“?”号,不识别这个文件,还是无法打开

  • 你清一下工程Clear Project再Build试试,像你说的Build完成但是没有生产.out文件,在Console窗口中应该有相关说明,你仔细看下

  • 你好,谢谢你的回复。之前我也已经多次Clear Project后重新Bulid ,但无用。

    Console提示:

                            "F:/Electric_Motor_control/lib/rts2800_ml.lib", line 1: error #171: expected a declaration
    "F:/Electric_Motor_control/lib/rts2800_ml.lib", line 2: error #7: unrecognized token
    "F:/Electric_Motor_control/lib/rts2800_ml.lib", line 3: warning #1-D: last line of file ends without a newline
    "F:/Electric_Motor_control/lib/rts2800_ml.lib", line 3: error #915: invalid character in input line
    "F:/Electric_Motor_control/lib/rts2800_ml.lib", line 3: error #7: unrecognized token

    "F:/Electric_Motor_control/lib/rts2800_ml.lib", line 3: error #7: unrecognized token
    "F:/Electric_Motor_control/lib/IQmath.lib", line 2: error #7: unrecognized token
    "F:/Electric_Motor_control/lib/IQmath.lib", line 3: error #915: invalid character in input line
    "F:/Electric_Motor_control/lib/IQmath.lib", line 3: error #7: unrecognized token
    "F:/Electric_Motor_control/lib/IQmath.lib", line 3: error #19: extra text after expected end of number
    "F:/Electric_Motor_control/lib/IQmath.lib", line 3: error #7: unrecognized token
    "F:/Electric_Motor_control/lib/IQmath.lib", line 3: error #7: unrecognized token
    "F:/Electric_Motor_control/lib/IQmath.lib", line 3: error #7: unrecognized token
    "F:/Electric_Motor_control/lib/IQmath.lib", line 3: error #7: unrecognized token
    "F:/Electric_Motor_control/lib/IQmath.lib", line 3: error #7: unrecognized token
    "F:/Electric_Motor_control/lib/IQmath.lib", line 3: error #7: unrecognized token

    是否是库文件出现问题,帮忙分析原因谢谢。

  • 这里所报的错误是两个库文件无法识别,你首先看一下报错的库文件所在路径是不是对的,然后在工程的Properties中设置下lib文件查找路径。如果编译还是报错通不过,再去找TI例程中的这两个库文件来替换你的这两个文件试试

  • 你好,我用的是28232,添加的库是否得用浮点形的,现在rts2800_ml 一直在报错,之前在2808中用这个库无问题

  • rts2800_ml.lib库文件是支持浮点运算的,你报错的内容是什么?

  • 这是我 Include Options配置是:

                           

    c2000 Linker - File Search path 的配置如下:

                           

    编译报错的内容是

               

    文件我也已经换过了,现象还一样,麻烦帮忙分析一下,谢谢!

  • 看你的设置好像有点问题,.lib文件是要添加到File Search Path设置的第一项中,第一项中的cmd不需要添加,你改一下再试试

  • 您好!

            已经修改过了,报的和之前一样的编译错误

           改后的配置如下:

                                  

    编译报错的内容也如下

                                    

     IQmath.lib 是从今天从TI官网上下的 1.5a 的版本

                       

  • 报错的内容中line1,line2,line3是指向IQmath.lib文件吗?

    方便的话把你的工程发上来,我给你看看

  • 是的,指向的IQmath.lib文件,工程截图我可以发上来。

  • 你好,我将工程已发传上来,直接编辑就会出现相关问题!麻烦帮忙分析一下!

  • 你好,我已经将工程传上来了,直接编译就会出现相关问题,麻烦你帮忙分析一下谢谢!

  • 你的工程我试过了,直接编译是会报IQmath.lib的错,由于你的.c文件没有,主函数为空,我去掉IQmath.lib文件及其相关设置,工程编译通过且生产了.out文件,但是此时还有几个关于rts2800_ml.lib的warning。由此判断你之前报错可能是因为你的应用文件中IQmath.lib的使用不正确,你可以参考下controlSUITE中的说明文件:C:\ti\controlSUITE\libs\math\IQmath\v160\doc\IQmath_Quickstart.pdf

  •  我之前用CCS 3.3开发时,也是使用这两个库,无任何问题。只是换了个平台,发生现在的问题。我先看看文档,谢谢你的帮助!

  • 你好,我按相关文档处理,程序已经可以正常编译了,谢谢!但仿真是,无法在线仿真,连接仿真器后,正常擦写,下载程序,但点击运行后,系统提示如下:

    CCS5.21 非常不熟悉,不知道又是哪里设置出了问题。

  • 点击工程,使工程显示处于Active-Debug状态再试试

  • 你好!

    我最近用的是C6657,不过暂时还没上板调试,但是我现在也出现添加头文件导致文件错误,我将头文件去掉,然后注释掉只剩main的空函数,还是回报错误,错误形式也不变

    Building file: ../evmc665x_gpio.c' 'Invoking: C6000 Compiler' "C:/ti/ccsv6/tools/compiler/c6000_7.4.14/bin/cl6x" -mv6600 --abi=coffabi -g --include_path="C:/ti/ccsv6/tools/compiler/c6000_7.4.14/include" --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="evmc665x_gpio.pp"  "../evmc665x_gpio.c" "../evmc665x_gpio.c", line 1: warning #1-D: last line of file ends without a newline "../evmc665x_gpio.c", line 1: error #915: invalid character in input line "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #78-D: this declaration has no storage class or type specifier "../evmc665x_gpio.c", line 1: error #66: expected a ";" "../evmc665x_gpio.c", line 1: error #10: "#" not expected here "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #7: unrecognized token "../evmc665x_gpio.c", line 1: error #8: missing closing quote 37 errors detected in the compilation of "../evmc665x_gpio.c"这是故障代码,弄了一整天也没弄明白,求赐教

     

  • 如果是前面有?该怎么处理?