青岛影楼后期培训学校:有关ccs2.2程序移植到ccs3.3undefined symbol __strasgi

来源:百度文库 编辑:九乡新闻网 时间:2024/04/27 08:01:25
 一楼:      利用vc下的x264代码经过修改,编译生成了x264.lib库文件,然后将该库文件添加到一个工程中,在编译的过程中,出现以下错误:
undefine symbol:                                   first use
__strasgi                                           。。。。。。x264.lib
也就是说,x264.lib的库文件中有这个没定义的符号。
但我仔细查了我的源文件,没有与strasgi相关的代码。生成x264.lib库工程的源文件中也没有这个东西。
使用untrlEdit打开x264.lib,对应着源文件,找到了__strasgi符号的位置,在源文件中发现没有这个东西,说明这个符号是ccs在编译的时候添加进去的。
可是这个符号的定义应该怎么添加呢???ccs目录下均未找到包含有该定义的头文件。
用google搜索,一个相关的问题都没有!!晕!!
请教下这里的各位大侠,请给提供一点信息,看看怎么解决这个问题。。         二楼

在ti上的解释

Ti上有个解释是这样的:(但是我的lib和工程都是在ccs3.3下生成的啊,编译器和环境都是一样的啊)

Question:
I’m using the C6000 compiler version 5.1.X and I get the following error message when I link:



undefined                        first referenced

symbol                              in file

---------                        ----------------

__strasgi                        vendor.obj

>>   error: symbol referencing errors - 'user.out' not built



What has gone wrong, and how can I fix it?

Answer:
You must be linking an object module (vendor.obj above) built with compiler version 6.0.X (or higher) with a runtime support (RTS) library from compiler version 5.1.X (or lower).



The function __strasgi is called by the compiler to perform structure assignment, and other similar memory copy operations.  This is termed an “internal” RTS function because it is not called directly by the user.  Floating point operations on fixed point devices are similarly performed with internal RTS functions.  Starting with compiler release 6.0.1, the internal RTS function __strasg is replaced with __strasgi.  Note the “i” at the end of the new function name; it stands for interruptible.  The new __strasgi can be interrupted.  The older __strasg cannot be interrupted.



In the case above, the vendor.obj most likely is brought into the build environment from some object library obtained elsewhere.  Which means it was built elsewhere as well.  And when the build of vendor.obj occurred, a compiler version 6.0.X (or higher) was used.  Such a build may place a call to __strasgi in the code.  If that is the case, then that code has to be linked with a RTS library that has a definition of the __strasgi function.  Libraries from releases 5.1.X (or older) do not have that function defined.



Two solutions exist.  One: Upgrade from compiler version 5.1.X to 6.0.X (or later).  Two: Change to using an older vendor library that was built with compiler version 5.1.X (or earlier).          三楼
自己把问题解决了,,晕!!!
换了个rts6400.lib ccs2.2 与ccs3.3的rts6400.lib不同