The code below won’t compile but does work on a Arduino.
The compiler give’s me the error: undefined reference to `String::operator=(String&&)’ on line T181 = line.substring. T181 is globally defined as String.
Hi @jacco - happy to help although it’s difficult to debug compile issues without the full code. Can you boil your code down to a short snippet that can be copy-pasted into the IDE that you expect to compile but will not?
Hmm, super weird. Not sure why that’s not compiling, it seems to be getting the typing confused. I’ve found a workaround that will help in the short term. Try this:
As a general comment, I have found the Core to be very specific in its arduino code requirements. That is, code that runs perfectly fine on an arduino will require some slight modification to properly run on the Core. As an example. I had an arduino sketch which used an IR proximity sensor to pulse LEDs below a specified threshold. On the arduino side, I hadn’t designated the digital pins to which the LEDs were connected as OUTPUT, yet the application ran perfectly fine. When I moved the code to the Core, the WebIDE required the digital pins to be set as OUTPUT, otherwise the app wouldn’t compile.
If anything, I suppose that’s a good thing as it taught me to be more explicit in my coding practices, but yes, I have noticed a slight difference between arduino and the Core.
@gaudsend Thanks for the feedback! Our goal is definitely to make transitioning between the Core and Arduino’s hardware as seamless as possible. Since the boards are based on different chipsets, though, it will take some help from the community to discover all the holes that need to be patched
If you have any other specific issues that we can add to our backlog for future improvement, we’d be happy to work on them to improve the experience of developing on the Core.
Same problem with this library https://github.com/nmattisson/HttpClient, it compiles outside the IDE but I’m getting the same error when I try on the IDE.
It would be awesome to have this library running on the core
I’m also having same issue with String data type. The temporary solution provided by @zach works but that requires to declare additional variable using additional memory. Can there be a permanent fix please? Thanks!