[GH-ISSUE #830] The definition of the "init ()" method is missing #694

Closed
opened 2026-02-28 01:26:36 +03:00 by kerem · 3 comments
Owner

Originally created by @ferchinas on GitHub (Feb 20, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/830

Hello:
I am updating the version of WifiManager to use it with ESP32, and I find the following problems.

Hardware

WiFimanager Branch/Release:

  • Master
  • Development

Esp8266/Esp32:

  • ESP8266
  • ESP32

Hardware: ESP-12e, esp01, esp25

  • ESP01
  • ESP12 E/F/S (nodemcu, wemos, feather)
  • ESP32 D1 mini Mh-Et

ESP32 Core Version:

  • 2.3.0
  • 2.4.0
  • 1.0.0

Description

There is a declaration of init () that does not have its definition.
The init () method, is defined as "protected", and I can not use it to initialize the object. (I do not initialize it in the constructor because the "wm" object I use it as a member of my own class)

I already solve these problems by modifying the library, and so I can compile my application.
It would be nice if the library includes the changes

Thank you

Originally created by @ferchinas on GitHub (Feb 20, 2019). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/830 Hello: I am updating the version of WifiManager to use it with ESP32, and I find the following problems. #### Hardware **WiFimanager Branch/Release:** - [ ] Master - [x] Development **Esp8266/Esp32:** - [ ] ESP8266 - [x] ESP32 **Hardware: ESP-12e, esp01, esp25** - [ ] ESP01 - [ ] ESP12 E/F/S (nodemcu, wemos, feather) - [x] ESP32 D1 mini Mh-Et **ESP32 Core Version:** - [ ] 2.3.0 - [ ] 2.4.0 - [x] 1.0.0 ### Description There is a declaration of [init ()](https://github.com/tzapu/WiFiManager/blob/bbc98a7e74453999d3ad9e6f337e4eb2396209d9/WiFiManager.h#L128) that does not have its definition. The init () method, is defined as "protected", and I can not use it to initialize the object. (I do not initialize it in the constructor because the "wm" object I use it as a member of my own class) I already solve these problems by modifying the library, and so I can compile my application. It would be nice if the library includes the changes Thank you
kerem closed this issue 2026-02-28 01:26:36 +03:00
Author
Owner

@tablatronix commented on GitHub (Feb 20, 2019):

init is a method of wifimanager parameter class...

what changes did you make and what are you doing ?

<!-- gh-comment-id:465754624 --> @tablatronix commented on GitHub (Feb 20, 2019): init is a method of wifimanager parameter class... what changes did you make and what are you doing ?
Author
Owner

@ferchinas commented on GitHub (Feb 20, 2019):

I was using the library a year ago, now I wanted to update it and my code did not compile. That's why I found that:

The method in WifiManager.h line 128, is not defined in WifiManager.cpp
void init (const char * id, const char * label, const char * defaultValue, int length, const char * custom);

And this method in the current version of the library is protected.

My modification was:

  1. Add the definition:
void WiFiManagerParameter :: init (const char * id, const char * label, const char * defaultValue, int length, const char * custom) {
init (id, label, defaultValue, length, custom, WFM_LABEL_BEFORE);
}
  1. I made public the init () methods
//protected:			
    void init(const char *id, const char *label, const char *defaultValue, int length, const char *custom);
    void init(const char *id, const char *label, const char *defaultValue, int length, const char *custom, int labelPlacement);
<!-- gh-comment-id:465774465 --> @ferchinas commented on GitHub (Feb 20, 2019): I was using the library a year ago, now I wanted to update it and my code did not compile. That's why I found that: The method in WifiManager.h line 128, is not defined in WifiManager.cpp ` void init (const char * id, const char * label, const char * defaultValue, int length, const char * custom); ` And this method in the current version of the library is protected. My modification was: 1) Add the definition: ``` void WiFiManagerParameter :: init (const char * id, const char * label, const char * defaultValue, int length, const char * custom) { init (id, label, defaultValue, length, custom, WFM_LABEL_BEFORE); } ``` 2) I made public the init () methods ``` //protected: void init(const char *id, const char *label, const char *defaultValue, int length, const char *custom); void init(const char *id, const char *label, const char *defaultValue, int length, const char *custom, int labelPlacement); ```
Author
Owner

@tablatronix commented on GitHub (Feb 20, 2019):

Oh I see there are 2 init, odd

<!-- gh-comment-id:465794895 --> @tablatronix commented on GitHub (Feb 20, 2019): Oh I see there are 2 init, odd
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#694
No description provided.