B4R Question Error/Bug in rCore.h when using the arduino "new" library?

TiDi

Member
Licensed User
Hi

Few months ago I start using B4A and B4R.
Then I try this nice tutorial:
https://www.b4x.com/android/forum/t...8-relays-wemos-d1-mini-wifi-android-4g.80909/

After some study (the android interface was missing) I was able to run it on the LOLIN32. I included also some improvement, like feed back and retry (Erel example).
That was with Arduino IDE 1.8.1, but I do not know which rCore.h library version was linked nor if the NEW library was involved.

A couple of days ago I update the Arduino IDE to the 1.8.5 and I tested with some example.
Then I switch to B4R, but a check of the relay tutorial give me a strange error on the NEW function (Arduino).
Search on Internet do not provide any solution.
To keep the long story short, before to go back to IDE 1.8.1, I found "a" solution by comment this code on the rCore.h (version 2).

#if !defined(_NEW)
extern void *operator new( size_t size, void *ptr );
#endif

It is a real Bug or the problem is on the NEW library?

Error reported

c:\users\. .\documents\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\new: In function 'void* operator new(std::size_t, void*)':
c:\users\. .\documents\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\new:129:51: error: declaration of 'void* operator new(std::size_t, void*) noexcept' has a different exception specifier
inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
^
In file included from C:\Users\..\DOCUME~1\B4R\8_relay\Objects\bin\sketch\B4RDefines.h:24:0,
from C:\Users\. .\DOCUME~1\B4R\8_relay\Objects\bin\sketch\AsyncStreams.cpp:1:
rCore.h:19: error: from previous declaration 'void* operator new(size_t, void*)'
extern void *operator new( size_t size, void *ptr );


Regard
 

TiDi

Member
Licensed User
Hi thanks

Unfortunately I have only LOLIN32 (ESP32) and I cannot test the ESP8266.
I find this old lib that is for the ESP8266 and I tray to use it.

https://github.com/Yveaux/esp8266-A...06-elf/xtensa-lx106-elf/include/c++/4.8.2/new

It works, but only with the modified rCore.
I upload the Arduino code and also the Andoid one, even if this is non involved in the problem, just in case some one is interested to investigate the problem.
In the Arduino archive I put also the compiler report (working version) and the "new" library. Compilation involve many many files.

Regards
 

Attachments

  • B4R_8relay.zip
    8.3 KB · Views: 315
  • B4A_8relay.zip
    9.9 KB · Views: 319
Upvote 0

TiDi

Member
Licensed User
Empty project never generate error, with or without modification.
But another "old" project generate the same error without the modification. Even this was ok before IDE update.
Both use the WiFi, while another (project), with only analog I/O involved, work and no error like the empy project.
See Sample.zip.
 

Attachments

  • Sample.zip
    3 KB · Views: 344
Upvote 0

TiDi

Member
Licensed User
Here the reports with the error, relay and server project.
Of the relay I put also the Arduino IDE report (loading the B4R project).
 

Attachments

  • Compiler_reports.zip
    6.9 KB · Views: 325
Upvote 0
Top