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.

Linker cannot find DSPF_sp_biquad()

Other Parts Discussed in Thread: TMS320C6678

Processor is TMS320C6678.

CCS version 5.3.0.00090.

I am trying to use the DSPF_sp_biquad() function in my application. In my project build settings, I have:

-          General -> Main -> Device -> Variant = Generic C66xx Device

-          General -> RTSC -> DSPLIB C66x and General -> RTSC -> DSPLIB C66x -> 3.1.0.0 are selected.

-          Build -> C6000 Compiler -> Include Options -> "${TI_MAS_DSPLIB_C66X_INSTALL_DIR}/inc" is in the “#include search path”

-          Build -> C6000 Linker -> File Search Path -> Include library file -> dsplib.ae66 is in this list

-          Build -> C6000 Linker -> File Search Path -> Add <dir> to library search path -> "${TI_MAS_DSPLIB_C66X_INSTALL_DIR}/lib" is in this list.

I can compile the source files without a problem, but the linker reports the following:

'Building target: audio_proc.out'

'Invoking: C6000 Linker'

"C:/ti/ccsv5/tools/compiler/c6000_7.4.1/bin/cl6x" -mv6600 --abi=eabi -g --display_error_number --diag_warning=225 --diag_wrap=off -z -m"audio_proc.map" -i"C:/ti/dsplib_c66x_3_1_0_0/lib" -i"C:/ti/pdk_C6678_1_1_2_6/packages/ti/csl/lib" -i"C:/ti/pdk_C6678_1_1_2_6/packages/ti/platform/evmc6678l/platform_lib/lib/debug" -i"C:/ti/ccsv5/tools/compiler/c6000_7.4.1/lib" -i"C:/ti/ccsv5/tools/compiler/c6000_7.4.1/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --rom_model -o "audio_proc.out" -l"./configPkg/linker.cmd"  "./igain/spf.obj" "./igain/peak_sil.obj" "./igain/loud_calc.obj" "./igain/igain.obj" "./igain/gain_calc.obj" "./igain/compander.obj" "./igain/cCurve.obj" "./src/band_filter.obj" "./src/audioUpmix.obj" "./src/audioIntelligain.obj" "./src/audioDownmix.obj" "./main.obj" "./audio_proc.obj" -lti.csl.intc.ae66 -ldsplib.ae66 -lti.platform.evm6678l.ae66 -l"libc.a"

<Linking>

 

 undefined                                                        first referenced   

  symbol                                                              in file        

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

 DSPF_sp_biquad(float *, float *, float *, float *, float *, int) ./src/audioUpmix.obj

 

error #10234-D: unresolved symbols remain

 

>> Compilation failure

error #10010: errors encountered during linking; "audio_proc.out" not built

gmake: *** [audio_proc.out] Error 1

gmake: Target `all' not remade because of errors.

 

**** Build Finished ****

 A quick search of the "DSPF_sp_biquad" string in dsplib.ae66 shows that this string appears multiple times in the file. I assume this means that the function is in the library.

Is there another library I should be including in my build?

What is going on?

  • I found the problem. I was using the function inside a C++ file. So, I needed:

    extern "C" {
    #include <dsplib.h>
    }

    It is very strange that C:\ti\dsplib_c66x_3_1_0_0\packages\ti\dsplib\src\DSPF_sp_biquad\DSPF_sp_biquad.h does not have an 'extern “C”' statement, and the app code has to do it itself. Normally, you would see the following in the ".h" file:

    #ifdef __cplusplus
    extern "C" {
    #endif

    List of C function prototypes

    #ifdef __cplusplus
    }
    #endif

    It is also very strange that the linker error message did not report the C++ mangled function name as the missing function. Instead, it reported the C function name.

    Is it basically assumed that only C will be used? If so, why include a C++ compiler in the dev studio?

  • I cannot speak to why the DSPLIB header files don't include the standard extern "C" guard -- on my install, not even the top-level dsplib.h has it -- but as a short-cut for possible future reference, the fact that the parameter types showed up in the linker error message indicates that the compiler expected C++ linkage for the function.

  • Hi Michael,
    Please continue to contribute more on e2e community. Thank you for your quick reply.