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.

more than one instance of overloaded function "PAL_sysTimerCtrl" has "C" linkage

Other Parts Discussed in Thread: CCSTUDIO

Hi

I am including pal_sys.h in my main.cpp file and I get the error

[main.cpp] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -g -q -@"=C:/Work/CloudCap/DSP/TASE_VPS_LT_DSP/VPS/config/xdcconfig/compiler.opt" -fr"../obj" -i"../inc" -i"C:/dvsdk_1_10_00_26_DM648/pspdrivers_1_10_00_09/packages" -d"_DEBUG" -d"CHIP_DM648" -mv64+ -@"../Debug.lkf" "main.cpp"
"C:/dvsdk_1_10_00_26_DM648/pspdrivers_1_10_00_09/packages/ti/sdo/pspdrivers/pal_sys/dm648/pal_sys.h", line 540: error: more than one instance of overloaded function "PAL_sysTimerCtrl" has "C" linkage
1 error detected in the compilation of "main.cpp".

>> Compilation failure

If I include it in a c file, it compiles OK.

PAL_sysTimerCtrl is overloaded in pal_sys.h as

PAL_Result PAL_sysTimerCtrl(Uint32 timerId,PAL_SysRtcIoctl rtcIoctl, void *arg);

 and

PAL_Result PAL_sysTimerCtrl(Uint32 timerId,PAL_SysTimerIoctl timerIoctl, void *arg);

What is the best way to solve this problem and still use .cpp?

Thanks[:D]

 

  • It looks like this is a known issue that should be fixed in a newer release of the PSP drivers, in the mean time you can either:

    Delete the prototype:-
    PAL_Result PAL_sysTimerCtrl(Uint32 timerId,PAL_SysTimerIoctl timerIoctl, void *arg); 

    Or alternatively rename:-
    PAL_Result PAL_sysTimerCtrl(Uint32 timerId,PAL_SysRtcIoctl rtcIoctl, void *arg); 
     to:-
    PAL_Result PAL_sysRtcCtrl(Uint32 timerId,PAL_SysRtcIoctl rtcIoctl, void *arg);

  • Thanks Bernie[:Y]

  • Hello

    I am including pal_sys.h in my  video_preview.cpp file and I get the error

    [i2c_params.c] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -g -@"=D:/dvsdk_1_11_00_00/examples/video_preview/evmDM6437/xdcconfig/compiler.opt" -pdr -fg -fr"D:/dvsdk_1_11_00_00/examples/video_preview/evmDM6437/Debug" -i"D:/dvsdk_1_11_00_00/examples/video_preview/evmDM6437" -i"." -i"/include" -i"D:/dvsdk_1_11_00_00/pspdrivers_1_10_00/packages/ti/sdo/pspdrivers/system/dm6437/bios/evmDM6437/video" -i"C:/CCStudio_v3.3/boards/evmdm6437_v2/include" -i"D:/dvsdk_1_11_00_00/pspdrivers_1_10_00/packages/ti/sdo/pspdrivers/drivers/vport" -i"D:/dvsdk_1_11_00_00/edma3_lld_1_05_00/packages/ti/sdo/edma3/drv" -i"D:/dvsdk_1_11_00_00/edma3_lld_1_05_00/packages/ti/sdo/edma3/rm" -i"C:/Intel/opencv/include_cv" -i"C:/Intel/opencv/include_cxcore" -i"D:/dvsdk_1_11_00_00/examples/video_preview/evmDM6437/OpenCV/cvaux/include" -i"D:/dvsdk_1_11_00_00/examples/video_preview/evmDM6437/OpenCV/cv/src" -d"CHIP_DM6437" -d"_NTSC" -d"DM6437_SOC_BUILD" -d"_DEBUG" -mv64+ -@"../../video_preview/evmDM6437/Debug.lkf" "i2c_params.c"
    "C:/dvsdk_1_11_00_00/pspdrivers_1_10_00/packages/ti/sdo/pspdrivers/pal_sys/DM6437/pal_sys.h", line 539: error: more than one instance of overloaded function "PAL_sysTimerCtrl" has "C" linkage
    1 error detected in the compilation of "i2c_params.c".

    >> Compilation failure

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


    >> Compilation failure

    If I include it in a c file, it compiles OK.

    PAL_sysTimerCtrl is overloaded in pal_sys.h as

    PAL_Result PAL_sysTimerCtrl(Uint32 timerId,PAL_SysRtcIoctl rtcIoctl, void *arg);