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.

What lib needs to use _cmpy intrinsic?

Hi,

I find some posts use _cmpy and _cmpyr intrinsics. When I try use them, there is a link error:

......................................

undefined first referenced

  symbol       in file    

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

__cmpy    ./main.obj     


error #10234-D: unresolved symbols remain

............................................

I have tried both rtsC64 and rtsC67. Neither works.

Below is an example of _cmpy from this forum.

Thanks for your help.

 

..........

long long result;

result = _cmpy(val1, val2);

  • If my answer is incomplete for you, this thread will need to be moved to the Compiler Forum where software tool questions like this are better served. Post back a reply to ask this thread to be moved there, if you still need it.

    Intrinsics are part of the compiler. You need to include the <c6x.h> header file to get correct symbols, but you would have had a different error message if you had not done that.

    The _cmpy instruction was first available on the C64x+ DSP core. it was not available on either the C64x or the C67x, nor on the C67x+ or any earlier versions.

    Which device are you using? If it is a C64x+ or C674x or C66x, then you will need to set your compiler to build for the correct device.

    If you need follow-up, please include the device, the version of CCS and the version of Code Generation Tools that you are using. But please reply by with positive or negative results so we will know if this needs to be moved.

    Regards,
    RandyP