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.
工具/软件:Code Composer Studio
您好!
进行了比较
对于 GPIO 配置、
我在 CCS 中遇到错误、
未定义的首次引用
符号
------ --------
_main C:/ti/ccsv6/tools/compiler/c6000_7.4.16/lib/rts6740.lib
但 RTS 支持库是编译器包的一部分。
所以、
在何处定义以及如何定义此库中使用的符号(_main)?
请帮助解决此错误吗?
这是我用于名为'sart4 '的项目的控制台窗口:-
****为项目 start4构建配置调试****
"C:\\ti\\ccsv6\\utils\\bin\\gmake"-k all
'生成文件:./start4.c'
'调用:C6000编译器'
"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 /ti/OMAPL138_StarterWare_1_10_04_01_new/include --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/drivers --include_path="C:/ti/OMAPL138_StarterWare_1_10_04_01_new/include/hw --include_path="C:trabus_remonation="C:trabuse-board_display_pred=--trabus_trabuse-board.trabuse-board_display_display_suppremote_display_suppremote_display_tranag="-cn"--trabout_tranag_tranag_trab-board.tranag_suppremote_display_suppremote_display_suppremote_display_suppremote_
'完工建筑:./start4.c'
'
'生成目标:start4.out'
'调用:C6000链接器'
"c:/ti/ccsv6/tools/compiler/c6000_7.4.16/bin/cl6x /ti/OMAPL138_StarterWare_1_10_04_01_new/examples/lcdkOMAPL138/demo /ti/ccsv6/tools/compiler/c6000_7.4.16/include -mv6740 --abi=coffabi -g -define=omappl138 -diag_wrap=off -diag_warning=225 -display_error_number -z -m"start4.map"-stack_size=0x800 -heap_size=0x800 -i"/ti/ccsv6/tools/compiler/c6000_7.4.16/lib /ti/OMAPL138_StarterWare_1_10_04_01_new/include/c674x/omapl138 /ti/OMAPL138_StarterWare_1_10_04_01_new/include -display_error_ex-rom-rom-start4 -/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/lib -display_ram_linker -rom-/ti/OMAPL138_StarterWare_1_10_04_01_new/include/hw -display_linep_ram_ram_ram_ram_modules=-/ti/OMAPL138_StarterWare_1_10_04_01_new/drivers -content-content_lineps.un_linep-core"-content_linep-core-over-track_ram_line-ram_ram_ram_ram_line_content-ov.track_ram_ram_ram_ram_ove"-content-content-content-content-content-content-content-content-content-content-content-content-content_lineps.un.track_ram_ram_ram_ram_ram_ram_ram_ove"-content-content-content-content-content-content-content-content_ov.
未定义的首次引用
符号
------ --------
_main C:/ti/ccsv6/tools/compiler/c6000_7.4.16/lib/rts6740.lib
错误#10234-D:未解析的符号仍然存在
错误#10010:链接期间遇到错误;未生成"start4.out"
>>编译失败
Makefile:140:目标'start4.out'的配方失败
gmake:***[start4.out]错误1.
gmake:目标"全部"不会由于错误而重新生成。
****构建完成****
此致、
Kshitika Bahekar
您的程序应包含一个 main 函数、该函数在程序启动时由编译器 RTS 调用。Kshitika Bahekar 说:在哪里定义和如何定义此库中使用的符号(_main)?
您好!
我已经有 main 函数。
它被命名为 start4.c、但现在我将其重命名为 main.c
错误未解决。
您好!
文件与函数不同。 函数 main 在文件中定义。
您所描述的是、您从重命名了一个文件 更改为 ,但链接器抱怨 的是,项目的任何文件中都没有名为 main 的函数。
建议阅读:
http://www.cplusplus.com/doc/tutorial/program_structure/
希望这对您有所帮助、
拉斐尔