maniacbug / StandardCplusplus

Standard C++ for Arduino (port of uClibc++)
588 stars 182 forks source link

Bug when using the library #36

Open nilsonLazarin opened 10 months ago

nilsonLazarin commented 10 months ago

I'm trying to use the library, but I'm facing this bug.

image

My OS is Debian 12

nilson@acerAspire:~$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"

My Arduino IDE is 1.8.19

nilson@acerAspire:~$ apt list arduino
Listing... Pronto
arduino/stable,now 2:1.8.19+dfsg1-1 amd64 [installed]
matthijskooijman commented 10 months ago

Hm, I remember this symptom, IIRC it was because this library ended up including the Arduino core new.h header or something rather than the StandardCplusplus version, and the former does not define _UCXXEXPORT.

The same thing happened in ArduinoSTL. See https://github.com/mike-matera/ArduinoSTL/issues/56#issuecomment-694429021 for some background, and https://github.com/mike-matera/ArduinoSTL/pull/82 for my proposed (but unmerged) fix for ArduinoSTL (which could probably be adapted to StandardCpluplus as well, but I won't have time for that).

nilsonLazarin commented 10 months ago

Thanks, @matthijskooijman

Because I don't need this resource (new) in my project, I only deleted the file new_handler.cpp from library folder and work very well.

image