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.

C++ program won't link with dsplib

Hello,

my c++ program for a C6747 won't link with dsplib. I get this error:

/opt/ti/C6000CGT7.3.0/bin/lnk6x -w -q -u _c_int00 -fs package/cfg/platforms_ti816x_dsp/debug/ linker.cmd -q -o platforms_ti816x_dsp/debug/[...]fig.oe674  package/cfg/platforms_ti816x_dsp/debug/DamianApp_pe674.xdl --abi=eabi -c -m package/cfg//platforms_ti816x_dsp/debug/App.xe674.map -l /opt/ti/C6000CGT7.3.0/lib/rts6740_elf.lib

 undefined        first referenced                                                               
  symbol              in file                                                                    
 ---------        ----------------                                                               
 DSPF_sp_fftSPxSP package/cfg/platforms_ti816x_dsp/debug/DamianApp/CPTCalculateConfigVisitor.oe674

error: unresolved symbols remain

linker.cmd contains the commands for linking dsplib:

-i /opt/ti/c674x-dsplib/lib
-l dsplib674x_elf.lib

It doesn't matter if I add these parameters to the commandline or put them in the linker file: the result is the same.

I compiled many pure c programs with dsplink and all was fine. This is the first time I want to link it against a C++ program, and it fails. BTW, a few other libs (edma for example) links fine to the same program...

I have really no idea what's wrong :(

 

Thanks for any help,

Markus

  • A wild guess. Maybe it's C++ name mangling coming into play. Perhaps you need to surround some of the TI header files with an extern "C" block.

  • Hello Norman,

    thanks for the answer, but the "extern C" is already in the header:

     

    /* ======================================================================= */
    /* dsplib674x.h -- C674x DSPLIB Universal Header                           */
    /*                                                                         */
    /* Rev 0.0.2                                                               */
    /*                                                                         */
    /* ----------------------------------------------------------------------- */
    /*            Copyright (c) 2009 Texas Instruments, Incorporated.          */
    /*                           All Rights Reserved.                          */
    /* ======================================================================= */

    #ifndef _DSPLIB674X_H_
    #define _DSPLIB674X_H_

    #ifdef __cplusplus
    extern "C" {
    #endif

     

    BTW, I forgot to mention that I'm using the latest DSPLIB from http://software-dl.ti.com/dsps/dsps_public_sw/c6000/web/c674_dsplib/latest/index_FDS.html ( c674x-dsplib_1_03_00_01_Linux-x86_Setup.bin)

  • I wrote a minimal test program to find out what's wrong. While doing this, I found out that the error occurs, no matter which language (C or C++) is used...

    So I'll open a new thread.