Hello, please help: how to use Multicore in my project? I found some info here get an error:
Arduino15\packages\arduino\hardware\mbed_rp2040\2.2.0\cores\arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_stdlib/include/pico/stdlib.h:11:10: fatal error: pico/stdio.h: No such file or directory
#include "pico/stdio.h"
Apparently isn't on the include path, so when pico/stdlib.h references pico/stdio.h it can't find it - I presume its meant to be in the same directory as stdlib.h
I don't think the use of #include "foo.h" style of syntax instead of the #include <foo.h> style will cause a "No such file or directory" error. The double quotes syntax causes the local path to be searched before the standard include paths, so even when it's less appropriate that the angle brackets syntax (i.e., the header file is in the standard include paths so searching the local path first is pointless), it will still always find the file if it is present.
It is possible that a filename collision could cause the double quotes syntax to find a local file when a non-local file was the target the author of the code intended to be #included, but that would not be likely result in a "No such file or directory" error. My primary issue with the unnecessary usage of the double quotes syntax is that it does as clearly indicate the intent of that code.
In addition to Windows, this file is used on Linux and macOS systems, which only support the / path separator, which Windows supports in addition to its goofy native \ separator. So in order to be compatible with all operating systems this must use /. So when the two paths are combined in the command you get the mixed path separators on Windows, but this is fine and happens on all Windows systems, so not the cause of the problem.
I think there might be something else going on here (that I really don't understand). Is it possible the mbed object isn't linked against the pico stdlib?
the reason I ask is because I've had this problem even when I provide complete path to stdlib.h. I've used two different workarounds.
put the functions in stdlib,h at the top of your .ino file. There are only four or five of them and they are all short.
2 use the community pico code. I have only had this issue with the mbed code