IAR 解决 Error[Li005]: no definition for…
明明声明,也定义了,但是偏偏编译就报这个错误。
如果你配置的是C++混合C,那.c文件的头文件都要加上这样一段
#ifndef _ENCODE_H_
#define _ENCODE_H_
#include <stdio.h>
#include "board.h"
#if defined(__cplusplus) //一定要加
extern "C" { //一定要加
#endif //一定要加
int test(int16_t w);
#if defined(__cplusplus) //一定要加
} //一定要加
#endif //一定要加
#endif //_ENCODE_H_