-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WiFi.h collides with the internal Arduino WiFi.h #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hmm... the other way around here... I was so hoping to finally get rid of the ESP prefix.
|
same thing if core is in Arduino install folder
|
I tried installing Arduino IDE 1.6.12 and moved the esp32 environment to Arduino/hardware but with the same result. I have no idea why the behavior is different between our two machines. |
I have had this sort of behavior aswell.. where it should pick the hardware or library version in arduino/hardware or arduino/libraries folder but does not, I suspect it is a bug in Arduino IDE. |
Me too! Is there any solution for the problem? If I use a direkt link to the esp32 wifi.h like this: |
Solution would be to find what is common between you and include workaround in the instructions. I personally can not come up with a reason to why this happens. Maybe it's something in the settings that Arduino stores for each user of a computer. |
Personally I think using "ESP32WiFi.h" would be perfectly fine; we're not aiming to be 100% compatible with the original WiFi.h library anyway. Even the official Arduino WiFi library for Arduino 101 is called "WiFi101.h", so i don't think that naming it with a chip/platform-specific prefix explicitly is a bad thing. |
hey guys, it's working fine now! I read the instructions and found the option "recursively clone submodules too" was checked in the git GUI. I use TortoiseGit, and there I checked the option "recursive" for a new checkout. Then I followed the instructions and now it's working. @me-no-dev: Please write it to the instructions that the "recursive" option is needed! @igrr: Yes I think it's generally a good way to name it "ESP32WiFi.h" or "WiFiESP32.h". |
The Arduino IDE uses the architectures value in library.properties as one of the criteria for deciding library include priorities. The architecture of the board is determined by the architecture folder of the hardware package. As you can see, @Sweet-Peas did not correctly follow the installation instructions, causing the architecture folder to be named
library.properties for the WiFi library sets the
The WiFi library bundled with the Arduino IDE sets the
Since the wildcard match was better than the architecture mismatch and the WiFi library bundled with the Arduino IDE was given include priority. In the case of @me-no-dev the installation instructions were followed correctly, causing the architecture folder to be named
and the Arduino IDE chose the correct library. So I don't think it is necessary to rename the library. As soon as you can add Boards Manager installation support the likelihood of the package being incorrectly installed will be greatly reduced. |
Hi, not sure if i am right here, but i have the same issue: Mehrere Bibliotheken wurden für "WiFi.h" gefunden (Multiple libraries were found for "WiFi.h") is there any solution where i not have to modify any files? |
per1234 is right. Try not to modify any files, that will cause other unknow problemes, just modify your directory name to "esp32". For me it was "arduino-esp32-master" and then i have modify it to "esp32", and that's work! |
@WayneKeenan that's no error. It's just some helpful information the Arduino IDE provides. Read what it says carefully. We would expect the ESP32 version of the WiFi library to be used and sure enough, what does it say?:
That would only be a problem if you actually wanted to use the Arduino WiFi library. Considering you're compiling for an ESP32, I find that highly unlikely. |
yes, sorry, I realised it was another 'legacy' name related error, had already deleted my comment. |
I'm getting the same result, but with a different cause: |
Extracted from your nightmare blob of output (use code fencing!!!):
So the correct WiFi library was used and therefore whatever problem you're having is completely unrelated to this issue. |
So from your reading is the compilation failing due to the wifi.h conflict or something else?
|
I think I might have found the issue. I've got storage optimisation turned on for my mac and it's marked a whole load of files as not needing to be held locally. This file was one of them. Error was being caused by the file not being available locally, even though it existed. |
i had the same problem, but solved it by not including #include <Arduino.h> in the sketch |
I was facing the same problem and now I resolved it. You include more than one library for a specific task, like in my case, I had included 2 wifi libraries and I was facing the problem. So you need to delete unrelated libraries and there would be only one library( only 1 wifi library). it will work fine. |
@shehrazjazib true story, the library names collide, which causes the problems ... I haven't found a better solution, other than removing the unwanted library from the path directory ... |
I got the same issue, and it's been fixed by a Not sure if you have run |
I solved it by using #include <Arduino.h> in the sketch, not sure what difference it makes but it is working. |
This solved the problem for me. |
Chose different board from Tools->Board after then build your code. That forces Arduino IDE to rebuilt. Then select your actual target board. When you build it should be solved. At least it worked for me. |
The confusion that this name collision causes, even when working nominally, is widespread. |
I kept getting this error where the two libraries would collide so the compilation would fail. I've decided explicitly tell the Arduino IDE that I wanted to use the ESP32's WiFi library. Works flawlessly now! If you want to use explicitly the ESP32 <WiFi.h> library I've created a <WiFi32.h> library. You can get it from my repo. link : github.com/1amchris/WiFi32.h |
Hi I get these errors after new install of Arduino 1.8.12. Any davice will be appreciated. C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'void _handle_async_event(lwip_event_packet_t*)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:183:68: error: no matching function for call to 'AsyncClient::_s_dns_found(const char*&, ip_addr_t*, void*&)'
In file included from C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:24:0: C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.h:137:17: note: candidate: static void AsyncClient::_s_dns_found(const char*, ip_addr*, void*)
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.h:137:17: note: no known conversion for argument 2 from 'ip_addr_t* {aka _ip_addr*}' to 'ip_addr*' C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'bool _start_async_task()': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:221:141: error: 'xTaskCreateUniversal' was not declared in this scope
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'void _tcp_dns_found(const char*, ip_addr*, void*)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:322:59: error: invalid application of 'sizeof' to incomplete type 'ip_addr'
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: At global scope: C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:32: error: field 'call' has incomplete type 'tcpip_api_call_data'
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:12: note: forward declaration of 'struct tcpip_api_call_data'
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_output(tcp_pcb*, int8_t)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:390:70: error: invalid conversion from 'err_t ()(tcpip_api_call_data) {aka signed char ()(tcpip_api_call_data)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call)}' [-fpermissive]
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:390:70: error: cannot convert 'tcpip_api_call_data*' to 'tcpip_api_call*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)' C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:12: note: class type 'tcpip_api_call_data' is incomplete
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_write(tcp_pcb*, int8_t, const char*, size_t, uint8_t)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:413:69: error: invalid conversion from 'err_t ()(tcpip_api_call_data) {aka signed char ()(tcpip_api_call_data)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call)}' [-fpermissive]
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:413:69: error: cannot convert 'tcpip_api_call_data*' to 'tcpip_api_call*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)' C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:12: note: class type 'tcpip_api_call_data' is incomplete
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_recved(tcp_pcb*, int8_t, size_t)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:435:70: error: invalid conversion from 'err_t ()(tcpip_api_call_data) {aka signed char ()(tcpip_api_call_data)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call)}' [-fpermissive]
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:435:70: error: cannot convert 'tcpip_api_call_data*' to 'tcpip_api_call*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)' C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:12: note: class type 'tcpip_api_call_data' is incomplete
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_close(tcp_pcb*, int8_t)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:455:69: error: invalid conversion from 'err_t ()(tcpip_api_call_data) {aka signed char ()(tcpip_api_call_data)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call)}' [-fpermissive]
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:455:69: error: cannot convert 'tcpip_api_call_data*' to 'tcpip_api_call*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)' C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:12: note: class type 'tcpip_api_call_data' is incomplete
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_abort(tcp_pcb*, int8_t)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:475:69: error: invalid conversion from 'err_t ()(tcpip_api_call_data) {aka signed char ()(tcpip_api_call_data)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call)}' [-fpermissive]
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:475:69: error: cannot convert 'tcpip_api_call_data*' to 'tcpip_api_call*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)' C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:12: note: class type 'tcpip_api_call_data' is incomplete
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_connect(tcp_pcb*, int8_t, ip_addr_t*, uint16_t, tcp_connected_fn)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:495:71: error: invalid conversion from 'err_t ()(tcpip_api_call_data) {aka signed char ()(tcpip_api_call_data)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call)}' [-fpermissive]
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:495:71: error: cannot convert 'tcpip_api_call_data*' to 'tcpip_api_call*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)' C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:12: note: class type 'tcpip_api_call_data' is incomplete
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_bind(tcp_pcb*, ip_addr_t*, uint16_t)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:514:68: error: invalid conversion from 'err_t ()(tcpip_api_call_data) {aka signed char ()(tcpip_api_call_data)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call)}' [-fpermissive]
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:514:68: error: cannot convert 'tcpip_api_call_data*' to 'tcpip_api_call*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)' C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:12: note: class type 'tcpip_api_call_data' is incomplete
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'tcp_pcb* _tcp_listen_with_backlog(tcp_pcb*, uint8_t)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:533:70: error: invalid conversion from 'err_t ()(tcpip_api_call_data) {aka signed char ()(tcpip_api_call_data)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call)}' [-fpermissive]
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:533:70: error: cannot convert 'tcpip_api_call_data*' to 'tcpip_api_call*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)' C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:350:12: note: class type 'tcpip_api_call_data' is incomplete
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In member function 'void AsyncClient::_dns_found(ip_addr*)': C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:981:24: error: invalid use of incomplete type 'struct ip_addr'
In file included from C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:24:0: C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.h:53:8: note: forward declaration of 'struct ip_addr' struct ip_addr;
C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:982:33: error: invalid use of incomplete type 'struct ip_addr'
In file included from C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:24:0: C:\Users\Daniel\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.h:53:8: note: forward declaration of 'struct ip_addr' struct ip_addr;
Multiple libraries were found for "WiFi.h" This report would have more information with |
You have hijacked a thread which has nothing to do with your issue. Man up, open a new issue, and format it properly. |
Mark,meet the same issue |
Is there still no real solution to this? I'm currently unable to get any basic sketch to work because of this. |
@PhilippMolitor the only problem is user error. The solution is to follow the instructions and use the platform correctly. Please read the explanation I provided earlier in the thread: |
I followed the instructions to install stable via Board Manager and am running into this on Catalina.
|
It's working perfectly. The "Used" library is the one that should be used. The "Not used" library is the one that shouldn't be used. Case solved. |
Sometimes functioning is far from "working perfectly". When we are talking about working within the Arduino IDE, an explicitly entry level programming environment, our goals should prioritize reducing confusion for novice developers. It is likely that changing the api now would to address this would be too onerous because it would break backwards compatibility, and that's a fine position to take. A 'solution' to this 'bug' might simply be some generous and accessible documentation. But I would suggest when this ticket is closed, it is done with recognition that it's confusing for many and therefore not ideal. |
I think it would be helpful to make the documentation very clear that only platform developers and beta testers should use the "Using Arduino IDE with the development repository" installation method. Novices should always use Boards Manager. It might be helpful to make it more clear the installation instructions are an OR. I occasionally see people posting on the Arduino forum who follow Boards Manager installation instructions, and then keep going down the list to also do the manual As for the 'It says: Multiple libraries were found for "WiFi.h", what is wrong?' issue, that could be added to an FAQ. |
Is there a solution to this problem? I just installed the Arduino IDE on Mac OS big sur and I get the same issues that other people were getting. When I tried to use the absolute path to the file it still fails because the paths to the dependencies are relative as well.
Any help with this would be greatly appreciated. |
Your problem is NOT due to multiple libraries. You can see in your log that
it chose the right one. But failed to access esptool.py with a permission
denied. Now I can't help here as I dont use mac products.
Le ven. 5 févr. 2021 1 h 56 p.m., Nick Santini <[email protected]> a
écrit :
… Is there a solution to this problem? I just installed the Arduino IDE on
Mac OS big sur and I get the same issues that other people were getting.
When I tried to use the absolute path to the file it still fails because
the paths to the dependencies are relative as well.
Multiple libraries were found for "WiFi.h"
Used: /Users/nicksantini/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WiFi
Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
fork/exec /Users/nicksantini/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py: permission denied
Any help with this would be greatly appreciated.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBFDCSOGVNDWVM2LAVC5JLS5Q5PLANCNFSM4CTDBBRQ>
.
|
Updating the esp2 to |
THANK YOU! I have spent so much time trying to figure this out and this was the only solution that has actually worked. This solves the multiple libraries problem on Mac OS Big Sur. |
I also have a sample case :( |
I think the original issue is very much solved, as it is now possible to install through board manager, which will place files in the correct location. If you have a problem, please open a new issue. |
Also, moving from Arduino IDE to PlatformIO solved this problem, while improving my code quality a lot and also adding all the good IDE features the VS Code has. Really a step forward. |
how @lbernstone mentioned this issue is mostly solved. Please open a new one if you face another problem. |
This is what I get when trying to include "WiFi.h"
Multiple libraries were found for "WiFi.h"
Used: /home/pontus/Programs/arduino-1.6.11/libraries/WiFi
Not used: /home/pontus/Programs/arduino-1.6.11/hardware/espressif/arduino-esp32/libraries/WiFi
Using library WiFi at version 1.2.7 in folder: /home/CORPUSERS/23061151/Programs/arduino-1.6.11/libraries/WiFi
See how it picks the wrong library. Someone should probably rename it back to EspWiFi.h or something like that.
The text was updated successfully, but these errors were encountered: