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.

CCS编译问题



我建立一个CCS工程,调用 platform_init(&init_flags, &init_config)函数时候,报错,错误如下?

undefined      first referenced  
  symbol            in file       
 ---------      ----------------  
 _platform_init ./src/uart_test.obj

error: unresolved symbols remain
error: errors encountered during linking; "UART.out" not built

我已经在都文件里面加了#include "platform.h"了,而且我按这ctl点击platform_init时也能进入platform.h文件找到Platform_STATUS platform_init(platform_init_flags * p_flags, platform_init_config * p_config);
为什么还会报上面的错误呢?

  • 你需要看你的头文件目录是否包含在你的include path选项里面。 ctrl点击只是C语言里面的index搜索,只要在你的这个project里面的它都可以搜索到,并不意味着编译器能找到你的头文件。