Hello all,
We have a downloaded the IQMath library for C64x+ CPU.
We tried some samples on the CCS simulator. It worked fine.
But we are facing some problem on the PC side. We read that we need to use the IQmath_pc.lib while using it on the PC.
We have with us VS 2008 and 2005. There seems to unresolved symbols as mentioned below.
We read the readme file in <IQMath install dir>\lib\VC++ Objs\readme.txt. It has been mentioned that the lib was built using VS6.0, but if anyone is using it with other versions of VS, then we could use the OBJ files directly.
But as mentioned, we are getting some errors. Can you kindly let us know how to resolve these errors. We have some algorithms that we want to convert to Fixed point on the PC , test the reference code and then port them to the C64X+ platform (Simulator).
Can you kindly let us know how to resolve these errors and if there is a sample which is available for the VS 2005 /2008.
Note: IQmath_pc.lib is from the IQMath lib folder, IQMathSample.obj: Is our sample application.
We have tried the following
1) included the IQMath_PC.lib in the project properties, linker->input-> additional dependencies
2) Copied all the obj’s provided with IQMath to debug directory of the VC++ project
3) Provided the path to both include and lib folder in the VC settings
4) Tried using IQMath_inline.h, but this throws other errors like “Unknown variable _abs(), _loll etc…
None of the above have helped in resolving the below issues
==========================================================
The code in the application is mentioned below.
#include "stdafx.h"
#ifdef _INLINE_IQMATH
# include "IQmath_inline.h"
#else
# include "IQmath.h"
#endif
//#include "typedef.h"
#define PI 3.14159F
_iq input, sine_out, y;
int _tmain(int argc, _TCHAR* argv[])
{
double z,M;
M = 1.23;
z = M*1.26 + 2.345;
z =_IQmpy(M, _FtoIQ(1.26)) + _FtoIQ(2.345);
z =_IQ23mpy(M, _FtoIQ23(1.26)) +_FtoIQ23(2.345);
input = _IQ29(0.25*PI);
y = _FtoIQ(10.9);
printf("%d", input);
return 0;
}
==========================================================
error LNK2019: unresolved external symbol __imp__printf referenced in function _wmain
1>IQMathSample.obj : error LNK2001: unresolved external symbol __fltused
1>IQmath_pc.lib(FtoIQ.obj) : error LNK2001: unresolved external symbol __fltused
1>IQmath_pc.lib(C6xSimulator.obj) : error LNK2001: unresolved external symbol __fltused
1>IQMathSample.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function _wmain
1>IQMathSample.obj : error LNK2019: unresolved external symbol __ftol2_sse referenced in function _wmain
1>IQMathSample.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
1>IQMathSample.obj : error LNK2001: unresolved external symbol __RTC_InitBase
1>LINK : error LNK2001: unresolved external symbol _wmainCRTStartup
1>IQmath_pc.lib(IQNmpy.obj) : error LNK2019: unresolved external symbol __chkesp referenced in function __IQNmpy
1>IQmath_pc.lib(C6xSimulator.obj) : error LNK2001: unresolved external symbol __chkesp
1>IQmath_pc.lib(FtoIQ.obj) : error LNK2019: unresolved external symbol __ftol referenced in function __FtoIQN
1>IQmath_pc.lib(C6xSimulator.obj) : error LNK2001: unresolved external symbol __ftol
Thanks and regards
/prasanna