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.
Tool/software: Code Composer Studio
Hello,
while using OMAP-L138
For GPIO configuration,
I got an Error in CCS,
undefined first referenced
symbol in file
--------- ----------------
_main C:/ti/ccsv6/tools/compiler/c6000_7.4.16/lib/rts6740.lib<args_main.obj>
But RTS support libraries are part of compiler package.
So,
Where to define and How to define this symbol (_main) used in this library?
Could you please help to resolve this error?
This is my console window for the project named 'start4 ':-
**** Build of configuration Debug for project start4 ****
"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../start4.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv6/tools/compiler/c6000_7.4.16/bin/cl6x" -mv6740 --abi=coffabi -g --include_path="C:/ti/ccsv6/tools/compiler/c6000_7.4.16/include" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/lib" --include_path="C:/ti/OMAPL138_StarterWare_1_10_04_01_new/examples/lcdkOMAPL138/demo" --include_path="C:/ti/OMAPL138_StarterWare_1_10_04_01_new/include/c674x/omapl138" --include_path="C:/ti/OMAPL138_StarterWare_1_10_04_01_new/include/hw" --include_path="C:/ti/OMAPL138_StarterWare_1_10_04_01_new/include" --include_path="C:/ti/OMAPL138_StarterWare_1_10_04_01_new/drivers" --define=omapl138 --diag_wrap=off --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="start4.d" "../start4.c"
'Finished building: ../start4.c'
' '
'Building target: start4.out'
'Invoking: C6000 Linker'
"C:/ti/ccsv6/tools/compiler/c6000_7.4.16/bin/cl6x" -mv6740 --abi=coffabi -g --define=omapl138 --diag_wrap=off --diag_warning=225 --display_error_number -z -m"start4.map" --stack_size=0x800 --heap_size=0x800 -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.16/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/lib" -i"C:/ti/OMAPL138_StarterWare_1_10_04_01_new/examples/lcdkOMAPL138/demo" -i"C:/ti/OMAPL138_StarterWare_1_10_04_01_new/include/c674x/omapl138" -i"C:/ti/OMAPL138_StarterWare_1_10_04_01_new/include/hw" -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.16/include" -i"C:/ti/OMAPL138_StarterWare_1_10_04_01_new/include" -i"C:/ti/OMAPL138_StarterWare_1_10_04_01_new/drivers" --reread_libs --define=DSP_CORE=1 --diag_wrap=off --display_error_number --warn_sections --xml_link_info="start4_linkInfo.xml" --rom_model -o "start4.out" "./start4.obj" "../linker.cmd" -lrts6740.lib
<Linking>
undefined first referenced
symbol in file
--------- ----------------
_main C:/ti/ccsv6/tools/compiler/c6000_7.4.16/lib/rts6740.lib<args_main.obj>
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "start4.out" not built
>> Compilation failure
makefile:140: recipe for target 'start4.out' failed
gmake: *** [start4.out] Error 1
gmake: Target 'all' not remade because of errors.
**** Build Finished ****
Regards,
Kshitika Bahekar
Your program should contain a main function, which is called at program startup by the compiler RTS.Kshitika Bahekar said:Where to define and How to define this symbol (_main) used in this library?
Hello,
I already have main function.
It was named as start4.c But now I renamed it as main.c
Error not resolved.
Hi,
A file is different than a function. A function main is defined inside a file.
What you described is that you renamed a file from <start4.c> to <main.c>, but what the linker is complaining is the absence of a function named main inside any of the files of your project.
Suggested reading:
http://www.cplusplus.com/doc/tutorial/program_structure/
Hope this helps,
Rafael