Errors compiling code teensy 4.1 and smartmatrix v5

heres the error code in full…
Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: “Arduino Uno”

In file included from C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:79:0:

C:\Users\nickm\Documents\Arduino\libraries\SmartMatrix\src/MatrixHardware_Teensy4_ShieldV5.h:41:17: note: #pragma message: MatrixHardware: SmartLED Shield for Teensy 4 (V5)

 #pragma message "MatrixHardware: SmartLED Shield for Teensy 4 (V5)"

                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:84:0:

C:\Users\nickm\Documents\Arduino\libraries\SmartMatrix\src/SmartMatrix.h:40:21: note: #pragma message: SmartMatrix Library version 4.000.003

 #    pragma message "SmartMatrix Library version 4.000.003"

                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from C:\Users\nickm\Documents\Arduino\libraries\GifDecoder-master\src/GifDecoder.h:111:0,

                 from C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:87:

C:\Users\nickm\Documents\Arduino\libraries\GifDecoder-master\src/GifDecoder_Impl.h: In member function 'int GifDecoder<maxGifWidth, maxGifHeight, lzwMaxBits, useMalloc>::startDecoding()':

C:\Users\nickm\Documents\Arduino\libraries\GifDecoder-master\src/GifDecoder_Impl.h:291:12: error: 'class HardwareSerial' has no member named 'printf'; did you mean 'print'?

     Serial.printf("Successfully opened GIF; Canvas size = %d x %d\n", gif->getCanvasWidth(), gif->getCanvasHeight());

            ^~~~~~

            print

C:\Users\nickm\Documents\Arduino\libraries\GifDecoder-master\src/GifDecoder_Impl.h: In member function 'int GifDecoder<maxGifWidth, maxGifHeight, lzwMaxBits, useMalloc>::startDecoding(uint8_t*, int)':

C:\Users\nickm\Documents\Arduino\libraries\GifDecoder-master\src/GifDecoder_Impl.h:343:12: error: 'class HardwareSerial' has no member named 'printf'; did you mean 'print'?

     Serial.printf("Successfully opened GIF; Canvas size = %d x %d\n", gif->getCanvasWidth(), gif->getCanvasHeight());

            ^~~~~~

            print

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino: At global scope:

AnimatedGifs:114:29: error: expected constructor, destructor, or type conversion before '(' token

 SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);

                             ^

AnimatedGifs:115:38: error: expected constructor, destructor, or type conversion before '(' token

 SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kBackgroundLayerOptions);

                                      ^

AnimatedGifs:117:37: error: expected constructor, destructor, or type conversion before '(' token

 SMARTMATRIX_ALLOCATE_SCROLLING_LAYER(scrollingLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kScrollingLayerOptions);

                                     ^

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino: In function 'void screenClearCallback()':

AnimatedGifs:147:3: error: 'backgroundLayer' was not declared in this scope

   backgroundLayer.fillScreen({0,0,0});

   ^~~~~~~~~~~~~~~

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:147:3: note: suggested alternative: 'kBackgroundLayerOptions'

   backgroundLayer.fillScreen({0,0,0});

   ^~~~~~~~~~~~~~~

   kBackgroundLayerOptions

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino: In function 'void updateScreenCallback()':

AnimatedGifs:153:3: error: 'backgroundLayer' was not declared in this scope

   backgroundLayer.swapBuffers();

   ^~~~~~~~~~~~~~~

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:153:3: note: suggested alternative: 'kBackgroundLayerOptions'

   backgroundLayer.swapBuffers();

   ^~~~~~~~~~~~~~~

   kBackgroundLayerOptions

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino: In function 'void drawPixelCallback(int16_t, int16_t, uint8_t, uint8_t, uint8_t)':

AnimatedGifs:159:5: error: 'backgroundLayer' was not declared in this scope

     backgroundLayer.drawPixel(x, y, {red, green, blue});

     ^~~~~~~~~~~~~~~

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:159:5: note: suggested alternative: 'kBackgroundLayerOptions'

     backgroundLayer.drawPixel(x, y, {red, green, blue});

     ^~~~~~~~~~~~~~~

     kBackgroundLayerOptions

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino: In function 'void setup()':

AnimatedGifs:186:5: error: 'matrix' was not declared in this scope

     matrix.addLayer(&backgroundLayer);

     ^~~~~~

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:186:5: note: suggested alternative: 'atoi'

     matrix.addLayer(&backgroundLayer);

     ^~~~~~

     atoi

AnimatedGifs:186:22: error: 'backgroundLayer' was not declared in this scope

     matrix.addLayer(&backgroundLayer);

                      ^~~~~~~~~~~~~~~

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:186:22: note: suggested alternative: 'kBackgroundLayerOptions'

     matrix.addLayer(&backgroundLayer);

                      ^~~~~~~~~~~~~~~

                      kBackgroundLayerOptions

AnimatedGifs:188:22: error: 'scrollingLayer' was not declared in this scope

     matrix.addLayer(&scrollingLayer);

                      ^~~~~~~~~~~~~~

AnimatedGifs:131:19: error: 'BUILTIN_SDCARD' was not declared in this scope

     #define SD_CS BUILTIN_SDCARD

                   ^

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:217:23: note: in expansion of macro 'SD_CS'

     if(initFileSystem(SD_CS) < 0) {

                       ^~~~~

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:131:19: note: suggested alternative: '__BUILTIN_AVR_WDR'

     #define SD_CS BUILTIN_SDCARD

                   ^

C:\Users\nickm\AppData\Local\Temp\arduino_modified_sketch_857873\AnimatedGifs.ino:217:23: note: in expansion of macro 'SD_CS'

     if(initFileSystem(SD_CS) < 0) {

                       ^~~~~

exit status 1

expected constructor, destructor, or type conversion before '(' token



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Board: “Arduino Uno”

There’s the main error, you need to choose the Teensy 4.1