在Nios II中总会出现一些很怪异的问题,这里要说的就是undefined reference to `>xxx'问题。
工具/原料
1
电脑
2
Nios II软件
方法/步骤
1
笔者在工程中添加了两文件一个为watchdog.c,另一个就是对应的watchdog.h。然后在main.c文件中添加了头文件语句:#include 'watchdog/watchdog.h'
2
经过编译始终报错。undefined reference to `WatchDog_Feed()'undefined reference to `WatchDog_Init(void*)'反复查找觉得都没有问题。
3
后来才发现,头文件的添加中,不仅要添加'.h'文件,也要添加“.c'文件,更改如下:#include 'watchdog/watchdog.h'#include 'watchdog/watchdog.c'
上一篇:cad旋转之参照旋转
下一篇:魔兽地图遗迹1.9攻略