..\OBJ\OLED.axf: Error: L6218E: Undefined symbol old_num_8 (referred from encoder.o).
时间: 2023-11-12 17:21:07 浏览: 55
This error message is indicating that the linker is unable to find a symbol called "old_num_8". This symbol is being referred to from the "encoder.o" object file, but it is not defined anywhere in the code.
To resolve this error, you need to find where the symbol "old_num_8" should be defined and make sure it is properly defined. This could be in a header file, a source file, or in an external library. Once you have located the definition, make sure that it is being compiled and linked into your project properly.
相关问题
..\OBJ\oled.axf: Error: L6218E: Undefined symbol read_encodeFR (referred from main.o).
根据提供的引用内容,错误提示信息是“Undefined symbol read_encodeFR (referred from main.o)”,意思是main.o文件中引用了read_encodeFR符号,但是链接器无法找到该符号的定义。这通常是由于缺少对应的库文件或者源文件导致的。
解决方案如下:
1. 确认read_encodeFR符号的定义是否存在于源代码或者库文件中,如果不存在则需要添加对应的源代码或者库文件。
2. 确认read_encodeFR符号的定义是否正确,如果不正确则需要修改对应的源代码或者库文件。
3. 确认read_encodeFR符号的定义是否被正确地包含在链接器的搜索路径中,如果没有则需要将其添加到搜索路径中。
以下是一个自定义read_encodeFR函数的例子:
```c
#include "head.h"
int main() {
while(1);
}
void read_encodeFR() {
// 自定义read_encodeFR函数,函数体为空
}
```
..\OBJ\OLED.axf: Error: L6218E: Undefined symbol TIM_ClearITPendingBit (referred from timer.o).
这个错误提示意味着在链接你的程序时,编译器无法找到 `TIM_ClearITPendingBit` 函数的定义。这通常是因为你在程序中使用了这个函数,但是没有包含相应的头文件或者链接了正确的库文件。
`TIM_ClearITPendingBit` 函数是一个定时器中断清除函数,在STM32的库函数中提供。因此,你需要在程序中包含正确的头文件,例如 `stm32f10x_tim.h`,并且链接正确的库文件,例如 `libstm32f10x_tim.a`。
如果你已经包含了正确的头文件和链接了正确的库文件,那么你需要检查你的代码中是否有拼写错误或其他语法错误。如果问题仍然存在,可能需要检查你的链接脚本或编译器设置是否正确。