Yup, I agree. Once I get the first include to find the correct SD.h, the rest should follow.
I wish that I understood where it WAS going to and why. I'll keep working on it. Christmas is coming and more free time!
Thanks.
Thanks. I saw something about the link order before but had forgotten. With the short program here, there don't seem to be many link order options.
I went through the log file from the compile and it seemed to be getting code from the right...
I'm still trying to find how to point it at the right library. The Arduino ide automatically grabs the Teensy 4.1 library. But even though I am using the same Arduino IDE (2) in VS, it's going to the wrong place, as we have seen...
OK, so I replaced my #include <SD.h> with
#include <C:\Users\hkems\AppData\Local\arduino15\packages\teensy\hardware\avr\1.59.0\libraries\SD\src\SD.h>
It recognised BUILTIN_SDCARD (it read the header) but still doesn't find the code...
OK, the same code failed in VS2022. You can see that it didn't recognise BUILTIN_SDCARD.
I had trouble setting up the VS2022 for teensy and maybe it's come back to bite me.
OK, the code above compiled and linked to Teensy 4.1 and loaded to the board, in the Arduino IDE.
As I expected!
With regard to posting all the code, I hoped that I was just being a wee bit Pascal and that the answer was immediately apparent to...
Apologies. This probably comes from me mostly programming in Free Pascal ...
I keep on getting the following message when compiling my C code in Visual Studio 2022:
ld.exe: CIS030925.cpp.o: in function setup
CIS030925.ino:61: undefined...