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.

CSS4 VLIB linking problem

Other Parts Discussed in Thread: CCSTUDIO

Hi Everybody,

1. It seems that vlib 2.1 doesn't link to my project on CSS4. Please help me. I hope it just something trivial.

2. In the vlib 2.1 readme file I read the following lines with some kind of unpleasant feeling in my heart:

"64x versions of VLIB_updateEWRMeanS32, VLIB_updateEWRVarianceS32, VLIB_subtractBackgroundS32,  
and VLIB_mixtureOfGaussiansS32 functions are now added to the 64x library. But they are not optimal due to the
absence of 32 bit multiplier in C64x."

Do you mean the absence of 32 bit vectorized multiplier, do you?  Does it mean that it is slower that we except regarding the vlib documentation pdf?

 

Regards,

Csaba

 

Building target: measure_dsp7.out'
'Invoking: Linker'
"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 6.1.16/bin/cl6x" -mv64+ -O3 --relaxed_ansi --cpp_default --static_template_instantiation --define=DSP64x --diag_warning=225 --opt_for_speed=3 -z -m"measure_dsp7.map" --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 6.1.16/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 6.1.16/include" -i"X:/Odin/main/lib/../obj/" -i"C:/Program Files/Texas Instruments/bios_5_41_02_14/packages/ti/rtdx/lib/c6000" -i"C:/Program Files/Texas Instruments/bios_5_41_02_14/packages/ti/bios/lib" --reread_libs --rom_model -o "measure_dsp7.out" -l"./measure_dsp7cfg.cmd" "./measure_dsp7cfg_c.obj" "./measure_dsp7cfg.obj" "./main.obj" -l"vlib.l64p" -l"base64x.lib" -l"calib64x.lib" -l"imgproc64x.lib" -l"vca64x.lib" -l"tracker64x.lib" -l"libc.a"
<Linking>

undefined first referenced
symbol in file
--------- ----------------
VLIB_updateEWRMeanS32(int *, unsigned char *, unsigned int *, unsigned int, int) ./main.obj

error: unresolved symbols remain
error: errors encountered during linking; "measure_dsp7.out" not built

 


 

 

 

  • Csaba,

    You get the unresolved symbol error when you are calling a function but it is not defined in your executable, i.e. the linker can't resolve it.  The problem is likely a missing library that needs to be included.  However I have no experience using the Video Analytics & Vision Library so I can't point you to which specific library file is missing. 

    I am going to move the post back into the DaVinci forum now so that the team there can help with the VLIB questions.

    Regards,

    John

  •  

    JohnS,

     

    I know what "unresolved symbol" mean.

    I hope I'm wrong, but I'm afraid it's a bug.

     

     

    The VLIB package consists a header a file (VLIB_prototypes.h) and a library binary file compiled by TI (vlib.l64p).

    VLIB_updateEWRMeanS32() is a VLIB library function. It should be in the vlib.l64p, but the linker doesn't find it.

     

    As you can see the linker command line, the vlib.l64p library is added to the project.

     

    I watched the vlib.l64p file by a text editor: the symbol exists in the file.

    I guess it can be a version incompatibility issue, because the vlib is tested by CSS3.3 regarding its readme file.

     

    Thanks,

    Csaba

  • Csaba,

    I tried to replicate your behaviour by adding the following code to some existing CCS v4 code I had that.

    {

    int * currentMean;

    unsigned char * newestData;

     

     

    unsigned int * foreground;

    VLIB_updateEWRMeanS32(currentMean, newestData,foreground, numInBytes,numInBytes);

    }

    and then built it with following output

    'Invoking: Compiler'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 6.1.16/bin/cl6x" -mv64+ -g --define=CHIP_DM6437 --define=DO_NOT_USE_CODEC_ENGINE --define=SIMULATOR --define=_NTSC --define=DM6437_SOC_BUILD --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 6.1.16/include" --include_path="C:/CCStudio_v3.3/c6400/VLIB_V_2_1/include" --include_path="C:/CCStudio_v3.3/boards/evmdm6437_v2/include" --diag_warning=225 --preproc_with_compile --preproc_dependency="video_universal_app_empty.pp" --cmd_file="C:/dvsdk_1_11_00_00_universal_codecs_ccs_v4/examples/video_universal_app_empty_no_ce_configuration/Default/configPkg/compiler.opt" "C:/dvsdk_1_11_00_00_universal_codecs_source/examples/video_universal_app_empty/evmDM6437/video_universal_app_empty.c"

    'Finished building: C:/dvsdk_1_11_00_00_universal_codecs_source/examples/video_universal_app_empty/evmDM6437/video_universal_app_empty.c'

    ' '

    'Building target: video_universal_app_empty_no_ce.out'

    'Invoking: Linker'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 6.1.16/bin/cl6x" -@ccsLinker.opt -o "video_universal_app_empty_no_ce.out"

    <Linking>

    'Finished building target: video_universal_app_empty_no_ce.out'

    ' '

    So I'd conclude that there is nothing intrinsically wrong with the vlib.l64p library in VLib 2.1. Suggestions I would make are:

    - check linker search paths are correct and that you have no other vlib.l64p libs on your system that may be picked up by mistake

    - cut and paste the CCS build output to a DOS patch file and then see how that links outside CCS. Ideally strip it back to as simple a system as possible.

    Iain

  •  

    The solution is to put #include "VLIB_prototypes.h" to an extern "C" {} block.

     

    Thanks for your answers; this time I was wrong.