当前位置:网站首页>error: redefinition of ‘xxx‘
error: redefinition of ‘xxx‘
2022-07-28 06:32:00 【Alice_ wm】
Problem description
Arduino Import the project PlatformIO Compilation encountered error: redefinition of ‘xxx’…note: ‘float humidity’ previously defined here, Twenty errors are reported during compilation , It's all a mistake :

Cause analysis :
What you find on the Internet is said to be the target header file .h No conditional compilation statement :
#ifndef _TEST_H_
#define _TEST_H_
//...
#endif
Then I found that the header file I introduced has added conditional compilation statements , Later, it was found that there were two projects .ino file , Although the two file names are different , But the content is the same ( Before I import, there is no co2-sensor-main.ino Of this file , I don't know how it came about ), Then I delete one , The compilation passed .
Mainly these two sentences ,***In file included from C:/Users/Administrator/Documents/PlatformIO/Projects/220614-094530-huzzah/src/co2-sensor-main.ino:4:
src\thermometer.h:8:7: error: redefinition of ‘Adafruit_SSD1306 display’
***In file included from C:/Users/Administrator/Documents/PlatformIO/Projects/220614-094530-huzzah/src/co2-sensor.ino:4:
src\thermometer.h:8:7: note: ‘Adafruit_SSD1306 display’ previously declared here
Redefinition “Adafruit_SSD1306 display”
Be careful :'Adafruit_SSD1306 display’ It was stated here before
Bold font from here we can feel that there are repeated references in the two documents , Then I open the comparison , Find the same code , So after deleting one , Try to compile , This time it passed .
There is a boss to point out why there is an extra one .ino Documents
边栏推荐
猜你喜欢

测量电脑电池容量

set_clock_groups

使用wampserver3.2.6时切换中文时造成启动失败

Talking about fluke optical cable certification? What is CFP? What is OFP?

Cronbach’s α?KMO系数?因子载荷?史上最易懂的问卷信效度分析教程!!!(SPSS和AMOS)

IP地址的五大分类

How can fluke dsx2-5000 and dsx2-8000 modules find the calibration expiration date?

set_ clock_ groups

Hugging face 的问题记录 I

Briefly introduce EMD decomposition, Hilbert transform and spectral method
随机推荐
Perl入门学习(十)格式化输出
Efficient Net_V2
A NOVEL DEEP PARALLEL TIME-SERIES RELATION NETWORK FOR FAULT DIAGNOSIS
Matlab simulation of radar imaging 1 - LFM signal and its spectrum
npm yarn相关的操作
Learning notes on hardware circuit design 2 -- step-down power circuit
Shuffle Net_ v1-shuffle_ v2
详解安装msdn 2015及其注意事项
EfficientNET_V1
set_case_analysis
天线效应解决办法
What are the common English questions in the postgraduate interview?
MySQL安装与使用
Selection of PLC
Synopsys Multivoltage Flow
Pytorch learning notes 2 - about tensor
Monitor the CPU temperature of raspberry pie 4B installed with esxi on ARM
转义字符笔记
多个ics日历合并成单个ics日历
set_multicycle_path