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.

How to call dsplib functions from *cpp file?

Hi! I can't compile CCS3.3 project (for C6455) with dsplib function, called from C++ file (main.cpp). Compiler gives the following error:

undefined first referenced
symbol in file
--------- ----------------
dsp_fft16x32 /main.obj

When I used the same C file (main.c), the project was compiled successfully.

How should I call dsplib function from C++ file to successfully compile the project?

  • Lenya,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages. Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics.

    There are a lot of forums within the E2E Community. Your question is really a software question, while this C64x Single Core DSP Forum is primarily for hardware questions. The Compiler/Assembler experts are more likely to see this question at the TI C/C++ Compiler - Forum. We will have this moved there for your convenience.

    I believe the answer may be one of two things, but I am not sure from what you have said so far.

    1. You have to include the DSPLIB library file in your project so it gets linked with the project. Did you do this?

    2. If you did include the library in your project, then the problem may be that the function needs to be declared with the extern "C" syntax. This is done in dsplib64plus.h, so you may need to make sure you have the latest DSPLIB installed for the C64x+.

    Regards,
    RandyP

     

    If you need more help, please reply back. If this answers the question, please click  Verify Answer  , below.

  • Thanks a lot!

    I discommented line:  extern "C"   in file dsplib64plus.h, and it helped!