B4R Question [Solved]Compiling error OLED inline C

teddybear

Well-Known Member
Licensed User
I am learning SSD1306 OLED from the post of Peter Simpson, and compiling encountered error, logs as below:

B4X:
In file included from C:\Users\<Myuser>\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/SSD1306Wire.h:31,
                 from C:\Users\<Myuser>\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/SSD1306.h:30,
                 from E:\b4r\Oled1366\Objects\src\b4r_main.cpp:12:
C:\Users\<Myuser>\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/OLEDDisplay.h: In member function 'virtual bool OLEDDisplay::connect()':
C:\Users\<Myuser>\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/OLEDDisplay.h:253:29: error: no return statement in function returning non-void [-Werror=return-type]
  253 |     virtual bool connect() {};
      |                             ^
cc1plus.exe: some warnings being treated as errors
exit status 1
DEBUG StatusLogger Stopping LoggerContext[name=1e6f5c3,

I searched the forums for the solution, I found this solution

The Arduino version I used is 1.8.19, I have uninstalled it and remove C:\Users\<Myuser>\AppData\Local\Arduino15 folder, now I have rolled back to Arduino IDE: Arduino 1.8.15, but compilig error is the same as before.

Thanks in advance
 
Last edited:
Solution
Are you sure you have downloaded the proper libraries (not now because arduino cloud file provider is down but obviously before) ?

hatzisn

Well-Known Member
Licensed User
Longtime User
Propably this is something similar to .net's abstract declaration. Also propably your error depends on arduino back end (but then again maybe not) because it fails to download the declared class from their cloud file provider as it is down.
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
Are you sure you have downloaded the proper libraries (not now because arduino cloud file provider is down but obviously before) ?
 
Upvote 0
Solution

teddybear

Well-Known Member
Licensed User
Are you sure you have downloaded the proper libraries (not now because arduino cloud file provider is down but obviously before) ?
Thanks for your reply.

The problem is solved, I downloaded Esp oled driver for SSD1306.
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
Good to know. When did you do that?

When I try to start arduino now it closes and when I start a "cmd" and go the same folder and run arduino_debug.exe I see this. Can you confirm that the same happens to you?


B4X:
Loading configuration...
Initializing packages...
Preparing boards...
java.io.IOException: The cloud file provider is not running
        at java.io.FileInputStream.readBytes(Native Method)
        at java.io.FileInputStream.read(FileInputStream.java:255)
        at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
        at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
        at java.io.InputStreamReader.read(InputStreamReader.java:184)
        at java.io.BufferedReader.fill(BufferedReader.java:161)
        at java.io.BufferedReader.readLine(BufferedReader.java:324)
        at java.io.BufferedReader.readLine(BufferedReader.java:389)
        at processing.app.legacy.PApplet.loadStrings(PApplet.java:249)
        at processing.app.helpers.PreferencesMap.load(PreferencesMap.java:100)
        at processing.app.helpers.PreferencesMap.load(PreferencesMap.java:74)
        at processing.app.packages.UserLibrary.create(UserLibrary.java:77)
        at cc.arduino.contributions.libraries.LibrariesIndexer.scanLibrary(LibrariesIndexer.java:226)
        at cc.arduino.contributions.libraries.LibrariesIndexer.scanInstalledLibraries(LibrariesIndexer.java:203)
        at cc.arduino.contributions.libraries.LibrariesIndexer.rescanLibraries(LibrariesIndexer.java:163)
        at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:681)
        at processing.app.Base.onBoardOrPortChange(Base.java:1339)
        at processing.app.Base$12.actionPerformed(Base.java:1599)
        at processing.app.Base.filterVisibilityOfSubsequentBoardMenus(Base.java:1645)
        at processing.app.Base.access$000(Base.java:88)
        at processing.app.Base$11.actionPerformed(Base.java:1570)
        at processing.app.Base.rebuildBoardsMenu(Base.java:1544)
        at processing.app.Base.<init>(Base.java:279)
        at processing.app.Base.main(Base.java:150)
java.lang.NullPointerException
        at processing.app.helpers.PreferencesMap.load(PreferencesMap.java:101)
        at processing.app.helpers.PreferencesMap.load(PreferencesMap.java:74)
        at processing.app.packages.UserLibrary.create(UserLibrary.java:77)
        at cc.arduino.contributions.libraries.LibrariesIndexer.scanLibrary(LibrariesIndexer.java:226)
        at cc.arduino.contributions.libraries.LibrariesIndexer.scanInstalledLibraries(LibrariesIndexer.java:203)
        at cc.arduino.contributions.libraries.LibrariesIndexer.rescanLibraries(LibrariesIndexer.java:163)
        at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:681)
        at processing.app.Base.onBoardOrPortChange(Base.java:1339)
        at processing.app.Base$12.actionPerformed(Base.java:1599)
        at processing.app.Base.filterVisibilityOfSubsequentBoardMenus(Base.java:1645)
        at processing.app.Base.access$000(Base.java:88)
        at processing.app.Base$11.actionPerformed(Base.java:1570)
        at processing.app.Base.rebuildBoardsMenu(Base.java:1544)
        at processing.app.Base.<init>(Base.java:279)
        at processing.app.Base.main(Base.java:150)
 
Upvote 0

teddybear

Well-Known Member
Licensed User
I did that just now

1681739082335.png
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
I just did too.

* it was an OneDrive thing (enabled option On Demand had to be disabled).
 
Upvote 0
Top