-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Description
Board
ESP32 Dev Module / Any ESP32
Device Description
N/A
Hardware Configuration
N/A
Version
latest master
IDE Name
Arduino IDE
Operating System
N/A
Flash frequency
N/A
PSRAM enabled
no
Upload speed
N/A
Description
libraries/WiFiProv/src/WiFiProv.h
does not appear to have include guards, causing issues if it is included multiple times from a project split into multiple source files / headers.
Other libraries seem to correctly have the usual
#ifndef <something>_H
#define <something>_H
blocks as expected, so I imagine this is a simple oversight?
This results in predictable compilation errors:
In file included from <snip>\myCustomProvCode.h:3,
from <snip>\myProject.ino:13:
<snip>\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\libraries\WiFiProv\src/WiFiProv.h:24:5: error: 'WIFI_PROV_SCHEME_SOFTAP' conflicts with a previous declaration
WIFI_PROV_SCHEME_SOFTAP,
^~~~~~~~~~~~~~~~~~~~~~~
Sketch
Something like this:
Sample.ino:
#include <WifiProv.h>
#include "myCustomProvCode.h"
myCustomProvCode.h:
#include <WifiProv.h>
will trigger the compilation error above.
### Debug Message
```plain
N/A: compilation error
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
No labels
Activity
VojtechBartoska commentedon Jan 27, 2022
Thanks @Ezekiel-DA for reporting issue and @mrengineer7777 for PR with fix! The PR will be reviewed soon.
Add conditional include to WiFiProv.h (#6192)
update 04022022 (#16)