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.

TMS320C64x+ IQmath Library link error

Other Parts Discussed in Thread: CCSTUDIO

One of our customers gets the following  link error with _IQ29atan2 call:

unresolved symbol _IQatan2HalfPITable, first referenced in C:/CCStudio_v3.3/c64plus/IQmath_v213/lib/IQmath_c64x+.lib<IQNatan2.obj>        
unresolved symbol _IQatan2Table, first referenced in C:/CCStudio_v3.3/c64plus/IQmath_v213/lib/IQmath_c64x+.lib<IQNatan2.obj>        
unresolved symbol _IQdivTable, first referenced in C:/CCStudio_v3.3/c64plus/IQmath_v213/lib/IQmath_c64x+.lib<IQNatan2.obj>
 

Any help to resolve this will be greatly appreciated.

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

This is an earlier message from the same customer:

 


do the following as per the example in SPRUGG9  (page 46)

#include <IQmath.h>

_iq29       in2, out2;

in2 =  _IQ29(1.0);
out2 = _IQ29atan(in2);

get the following error

unresolved symbol __IQ29atan

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

I think the reason for this error is that definitions for _IQNatan() are missing in the header file.

 

 

  • Line 87 of IQmath.h has the following statement: #if MATH_TYPE == IQ_MATH

    From what I can tell it looks like this is causing the #else on line 4107 to fail. The #define for _IQ29atan(A) falls underneath the #else on line 4107 meaning that the compiler is ignoring it. I think if they changed the #define for MATH_TYPE on line 30 from IQ_MATH to FLOAT_MATH this would allow them to use the _IQ29atan(A) definition. Alternately they should be able to swap out the _IQ29atan(A) define with the _IQ29atan2(A,B) define instead.

  • Tim,

    There are two issues here.

    Original issue could be as a result of not defining MATH_TYPE as FLOAT_MATH. But it defeats the purpose of using IQmath lib.  There is no indication in the functional description (page 46) that _IQNatan can be used only if MATH_TYPE is defined as FLOAT_MATH. I think it is just a case of missing defines.

    What I also showed in my previous post is that calling _IQ29atan2() results in link error.

     

    Rama

     

     

     

  • Rama, there are two errors:

    • "unresolved symbol __IQ29atan" : This as you guessed right is because few definitions related to IQatan are missing from the header file.

    #define _IQ29atan(A)     (_IQNatan2((A), _IQ(1),29))

    • The second link error is strange. Is the customer including the IQmath_RAM_c64x+.lib?

    Gagan

     

  • Thanks Gagan.

     

    I have alerted the customer about the need to include IQmah_RAM_c64x+.lib.

     

    Rama