Do you have the needed library file, and is it the correct version?
A search yielded:
"...I deleted the ESP32_BLE_ARDUINO folder in the libraries and problem solved. The necessary BLEDevice library is included in the arduino libraries already...."
Hi @rlghd03. The different results between Arduino Web Editor and your "offline editor" are likely caused by differences in the dependencies installed on each system.
In order to verify my hypothesis, I'm going to ask you to post the verbose compilation output produced by compiling the same example sketch using both Arduino Web Editor and your "offline editor". I'll provide instructions below for getting the verbose output from Arduino Web Editor.
I also would like to provide instructions for getting the output from the "offline editor", but I will need to know exactly what it is first. By "offline editor", do you mean Arduino IDE? If so, which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the Help > About dialog.
NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.
Please do this:
From the menu on the left side of the "Arduino Web Editor" window, click "Preferences".
Check the box next to "â Always show output panel**".
Check the box next to "â Console: Show verbose output**".
In the sketch panel, click the (verify) button.
After the compilation fails, click the icon in the top right corner of the black console window at the bottom of the "Arduino Web Editor" window that looks like two pieces of paper.
In a forum reply here, click on the reply field.
Click the </> button on the forum toolbar.
This will add the forum's code block markup (```) to your reply to make sure the compilation output is correctly formatted.
Press Ctrl+V.
This will paste the compilation output between the code tags.
Move the cursor outside of the code tags before you add any additional text to your reply.
Click the Reply button to post the output.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:
Open a forum reply here by clicking the Reply button.
Click the "Upload" icon () on the post composer toolbar:
Select the .txt file you saved.
Click the Open button.
Click the Reply button to publish the post.
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.