Compilation error

I currently get the following error when trying to compile my code. I use SmartMatrix version 4.0.3.

In file included from .pio\libdeps\teensy41\SmartMatrix\src/SmartMatrix.h:222:
.pio\libdeps\teensy41\SmartMatrix\src/MatrixTeensy4Hub75Refresh_Impl.h: In instantiation of ‘SmartMatrixRefreshT4<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::SmartMatrixRefreshT4(uint8_t, volatile rowDataStruct*) [with int refreshDepth = 36; int matrixWidth = 128; int matrixHeight = 32; unsigned char panelType = 0; long unsigned int optionFlags = 0; uint8_t = unsigned char]’:
src\main.cpp:18:1: required from here
119 | SmartMatrixRefreshT4<pwm_depth, width, height, panel_type, option_flags> matrix_name##Refresh(buffer_rows, rowsDataBuffer);
| ^
.pio\libdeps\teensy41\SmartMatrix\src/MatrixTeensy4Hub75Refresh_Impl.h:110:10: error: section of alias ‘SmartMatrixRefreshT4<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::SmartMatrixRefreshT4(uint8_t, volatile rowDataStruct*) [with int refreshDepth = 36; int matrixWidth = 128; int matrixHeight = 32; unsigned char panelType = 0; long unsigned int optionFlags = 0; uint8_t = unsigned char]’ must match section of its target
110 | FLASHMEM SmartMatrixRefreshT4<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::SmartMatrixRefreshT4(uint8_t bufferrows, volatile rowDataStruct * rowDataBuf) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please show a whole your code.

Hey! I ran into this same problem. I had code that compiled 6 months ago that was fine, and now it fails due to an error in compiling the library.
Oni Also posted in the PJRC Forums about this and got an answer for it:

I can confirm I was able to get this to build by specifying this in my platform_ini file:

platform = teensy@5.0.0
platform_packages = toolchain-gccarmnoneeabi-teensy@1.110301.0