现象
有#include,go to define 出现以下情况:
原因
本质是多个定义域内#include,编译器无法确定跳转到哪个作用域。
问题所在
在函数内使用#include
void _test(void)
{
#include "hal_uart.h"
#include "string.h"
解决方法
将函数内的#include移至函数外即可。
有#include,go to define 出现以下情况:
本质是多个定义域内#include,编译器无法确定跳转到哪个作用域。
在函数内使用#include
void _test(void)
{
#include "hal_uart.h"
#include "string.h"
将函数内的#include移至函数外即可。