NiosII中的undefined reference to “xxx”问题

 时间:2026-02-12 04:58:55

1、笔者在工程中添加了两文件一个为watchdog.c,另一个就是对应的watchdog.h。然后在main.c文件中添加了头文件语句:

#include "watchdog/watchdog.h"

NiosII中的undefined reference to “xxx”问题

2、经过编译始终报错。

undefined reference to `WatchDog_Feed()'

undefined reference to `WatchDog_Init(void*)'

反复查找觉得都没有问题。

NiosII中的undefined reference to “xxx”问题

NiosII中的undefined reference to “xxx”问题

3、后来才发现,头文件的添加中,不仅要添加".h"文件,也要添加“.c"文件,更改如下:

#include "watchdog/watchdog.h"

#include "watchdog/watchdog.c"

NiosII中的undefined reference to “xxx”问题

  • 锅炉燃烧的调节规定?
  • 980快中间停车吗
  • 香港手表-购表攻略
  • 女生来大姨妈了应该注意什么?生活小常识
  • 手机质保换新版是啥意思
  • 热门搜索
    中秋节的手抄报怎么画 一岁宝宝拉肚子怎么办 苹果笔记本怎么用 打价机怎么装纸 燕窝怎么做 怎么消除静电 么怎么组词 怎么隐藏应用 开机密码忘了怎么办 仓鼠怎么分公母