error: ld returned 1 exit status

WHEN I BUILD THE PROGRAM THAT ERROR OCCUR GCC HOME: C:Program Files (x86)GNU Tools ARM Embedded4.7 2013q1bin
compile:
     Skipping C:CooCoxCoIDEworkspacelpcdemo1lpcdemo1Debugbin because it already exists.
     Skipping C:CooCoxCoIDEworkspacelpcdemo1lpcdemo1Debugobj because it already exists.
        Starting dependency analysis for 13 files.
        Parsing ..\..\..cmsiscore_cm3.c
        Parsing ..\..\..lpc17xx_libsourcelpc17xx_clkpwr.c
        Parsing ..\..\..lpc17xx_libincludelpc17xx_clkpwr.h
        Parsing ..\..\..cmsis_bootLPC17xx.h
        Parsing ..\..\..lpc17xx_libincludelpc_types.h
        Parsing ..\..\..cmsiscore_cm3.h
        Parsing ..\..\..cmsis_bootsystem_LPC17xx.h
        Parsing ..\..\..cmsis_bootsystem_LPC17xx.c
        Parsing ..\..\..main.c
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceincludeFreeRTOS.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceincludetask.h
        Parsing ..\..\..lpc17xx_libincludelpc17xx_pinsel.h
        Parsing ..\..\..lpc17xx_libincludelpc17xx_gpio.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceincludeprojdefs.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceFreeRTOSConfig.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceincludeportable.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableoWatcom16BitDOSPCportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableoWatcom16BitDOSFlsh186portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCATMega323portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARATMega323portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableMPLABPIC24_dsPICportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableMPLABPIC24_dsPICportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableMPLABPIC18Fportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableMPLABPIC32MXportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableSDCCCygnalportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCARM7_LPC2000portmacro.h
        Parsing ..\..\..\..lpc demoFreeRTOSportableGCCARM_CM3portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCARM7_LPC23xxportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARMSP430portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCMSP430F449portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableRowleyMSP430F449portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableRVDSARM7_LPC21xxportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCARM7_AT91SAM7Sportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARAtmelSAM7S64portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARAtmelSAM9XEportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARLPC2000portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARSTR71xportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARSTR75xportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCSTR75xportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARSTR91xportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCH8S2329portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCARM7_AT91FR40008portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableRVDSARM_CM3portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCARM_CM3portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCARM_CM3portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARARM_CM3portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARARM_CM3portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableCodeWarriorHCS12portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCMicroBlazeportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableParadigmTern_EEsmallportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCHCS12portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCMCF5235portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableCodeWarriorColdFire_V2portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCPPC405_Xilinxportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableGCCPPC440_Xilinxportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableSoftuneMB96340portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableBCC16BitDOSPCprtmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableBCC16BitDOSFlsh186prtmacro.h
        Parsing ..\..\..\..lpc demoFreeRTOSportableGCCARM_CM3portmacro.h
        Parsing ..\..\..\..lpc demoFreeRTOSportableGCCARM_CM3portmacro.h
        Parsing ..\..\..\..lpc demoFreeRTOSportableGCCARM_CM3portmacro.h
        Parsing ..\..\..\..lpc demoFreeRTOSportableGCCARM_CM3portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARV850ESportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARV850ESportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARV850ESportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARV850ESportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIARV850ESportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIAR78K0Rportmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceportableIAR78K0Rportmacro.h
        Parsing ..\..\..\..lpc demoFreeRTOSportableGCCARM_CM3portmacro.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceincludempu_wrappers.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceincludelist.h
        Parsing ..\..\..lpc17xx_libsourcelpc17xx_gpio.c
        Parsing ..\..\..lpc17xx_libincludelpc17xx_libcfg_default.h
        Parsing ..\..\..\..lpc demoFreeRTOStasks.c
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceincludetimers.h
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceincludeStackMacros.h
        Parsing ..\..\..cmsis_bootstartupstartup_LPC17xx.c
        Parsing ..\..\..lpc17xx_libsourcelpc17xx_libcfg_default.c
        Parsing ..\..\..lpc17xx_libsourcelpc17xx_pinsel.c
        Parsing ..\..\..\..lpc demoFreeRTOSlist.c
        Parsing ..\..\..\..lpc demoFreeRTOSqueue.c
        Parsing ..\..\..\..\..\..\..FreertosFreeRTOSV7.4.1FreeRTOSSourceincludecroutine.h
        Parsing ..\..\..\..lpc demoFreeRTOSportableGCCARM_CM3port.c
        Parsing ..\..\..\..lpc demoFreeRTOSportableMemMangheap_2.c
        13 files are up to date.
        0 files to be recompiled from dependency analysis.
        0 total files to be compiled.
        Starting link
        arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -g -nostartfiles -flto -Wl,-Map=lpcdemo1.map -O0 -Wl,-gc-sections -Wl,-entry=main -LC:CooCoxCoIDEconfigurationProgramDatalpcdemo1 -Wl,-TC:CooCoxCoIDEconfigurationProgramDatalpcdemo1/arm-gcc-link.ld -g -o lpcdemo1.elf ..objcore_cm3.o ..objlpc17xx_clkpwr.o ..objsystem_LPC17xx.o ..objmain.o ..objlpc17xx_gpio.o ..objtasks.o ..objstartup_LPC17xx.o ..objlpc17xx_libcfg_default.o ..objlpc17xx_pinsel.o ..objlist.o ..objqueue.o ..objport.o ..objheap_2.o
        C:UsersUserAppDataLocalTempccX3Qe03.ltrans0.ltrans.o: In function `vTaskStartScheduler’:
        C:CooCoxCoIDEworkspacelpc demoFreeRTOS/tasks.c:1087: undefined reference to `vConfigureTimerForRunTimeStats’
        collect2.exe: error: ld returned 1 exit status ANYONE KNOW HOW TO SOVE THIS PROBLEM?

error: ld returned 1 exit status

Might I suggest that you read the http://www.freertos.org/FAQ-how-to-use-the-FreeRTOS-support-forum.html before posting a question next time? Honestly it is good that you posted the actual error message you are getting, but you have provided no information about your system or what you have done to try and fix the problem. The key is in the last three lines of your build output. The message “error: ld returned 1 exit status” indicates that ld (the linker) failed to link. The next two lines above show why it failed. I will strip away the headers for each line and show the ‘english’ output.
** In function `vTaskStartScheduler’: undefined reference to `vConfigureTimerForRunTimeStats’** I would suggest that you either need to provide the function vConfigureTimerForRunTimeStats() OR disable the configuration option configGENERATE_RUN_TIME_STATS which would cause it to be enabled. More info here: http://www.freertos.org/rtos-run-time-stats.html (found by Googling vConfigureTimerForRunTimeStats). Best of luck with your development!