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.

UNDEFINED SYMBOL

Other Parts Discussed in Thread: CCSTUDIO

I have met this problem before, but this time I don't know how to solve it.
I want to build a program to realize loopback and h.264 encode and decode,so I built a project upon C:\dvsdk_1_00_00_19\PSP_0_05_03\pspdrivers\system\DM6437\bios\dm6437_evm\src\video\sample\loopback\psp_bios_vpss_loopback_sample.c,I have configured this project well with dsp/bios,however,when I "rebuild all",two errors occur,
--------------------------  sun_loopback.pjt - Debug  --------------------------
[Linking...] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -@"Debug.lkf"
<Linking>

undefined                        first referenced
 symbol                              in file
---------                        ----------------
_trace                           C:\\dvsdk_1_00_00_19\\sun_loopback\\Debug\\psp_bios_vpss_loopback_sample.obj
_main                            C:/CCStudio_v3.3/bios_5_31_02/packages/ti/bios/lib/bios.a64P
>>   error: symbol referencing errors - './Debug/sun_loopback.out' not built

 

These problems puzzeled me ,the most difficult is I don't know where this error occurs,I have serched "trace"and'main' in this project, but it seems that I don't use these keywords at all.I have included many libs,including rts6400.lib and all the libs of this file "C:\dvsdk_1_00_00_19\PSP_0_05_03\pspdrivers\lib\DM6437\Debug\".
I think I need your help,Thanks.

  • This is a bit of an old DVSDK, since you have already started development you may want to stick with it, however there are newer DVSDKs available through www.ti.com/davinciregistration.

    As to the error, the underscore before a symbol is just the assembly representation, so when it says it is looking for _main this probably refers to your own main() function which I imagine is built into one of the C files that is being linked here? Trace should be similar though I am not sure where this one would be coming from, it is possible you are missing some key C file for building this project somehow.

  • Thanks to your answer, it's true that I had put main()function into one of the c files, Just now I wrote a main funciton ,and delete the main function of the C file, just like this:

    *******************************************************************************

     psp_bios_loopback_sample.c

    ........

    static void vpss_main()

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

    *****************************************

    main.c


    void start_vpss_test()
    {
        vpss_main();
    }
    it seems that the two errors still exits,,which shows

    --------------------------  sun_loopback.pjt - Debug  --------------------------
    [main.c] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -g -pdsw225 -fr"C:/dvsdk_1_00_00_19/sun_loopback/Debug" -d"_DEBUG" -mv6400+ -@"Debug.lkf" "main.c"
    "main.c", line 71: warning: function declared implicitly

    [Linking...] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -@"Debug.lkf"
    <Linking>

    undefined                        first referenced
     symbol                              in file
    ---------                        ----------------
    _vpss_main                       C:\\dvsdk_1_00_00_19\\sun_loopback\\Debug\\main.obj
    _main                            C:/CCStudio_v3.3/bios_5_31_02/packages/ti/bios/lib/bios.a64P
    _trace                           C:\\dvsdk_1_00_00_19\\PSP_0_05_03\\pspdrivers\\lib\\DM6437\\Debug\\prev_bios_drv.lib
    >>   error: symbol referencing errors - './Debug/sun_loopback.out' not built

    >> Compilation failure

    Build Complete,
      2 Errors, 1 Warnings, 0 Remarks.
    I still puzzled about this problem.

    Thanks

  • You need to have an actual main() function somewhere, that is a function with the name main (vpss_main will not count), even if it does nothing but return so BIOS tasks can start, the C environment needs somewhere that it can start from otherwise it will not know what to run first.

  • Thanks a lot, I know where I am wrong ,  now it's midnight in China, I need to sleep,tired,thanks again.[:)]

  • hello~!

    I want to know specific way.

    How to resolve the problem?

    my EVM board is DM6467T.

    my project goal is DSP porting with Mplayer.

    after build this project, like bottom. ERROR!!!!!!

    HELP ME!!!!!

     --------------------------  lib_baseline.pjt - Debug  --------------------------
    Build Complete,
      0 Errors, 0 Warnings, 0 Remarks.
    ----------------------------  lib_main.pjt - Debug  ----------------------------
    Build Complete,
      0 Errors, 0 Warnings, 0 Remarks.
    ----------------------------  lib_svc.pjt - Debug  ----------------------------
    Build Complete,
      0 Errors, 0 Warnings, 0 Remarks.
    ----------------------------  LibOnDsp.pjt - Debug  ----------------------------
    [Linking...] "E:\Program Files (x86)\Texas Instruments\C6000 Code Generation Tools 7.0.4\bin\cl6x"
    -@"Debug.lkf"
    <Linking>

     undefined first referenced                                                      
      symbol       in file                                                           
     --------- ----------------                                                      
     _main     E:/CCStudio_v3.3/bios_5_33_06/packages/ti/bios/lib/bios.a64P<boot.o64P>

    error: unresolved symbols remain
    error: errors encountered during linking; "../bin/libOnDsp.out" not built

    >> Compilation failure

    Build Complete,
      1 Errors, 0 Warnings, 0 Remarks.

    Recursive Build Complete,
      Total Count: 1 Errors, 0 Warnings, 0 Remarks.