Error compiling for board 'Arduino Genuino/Uno'

I am trying to scroll letters on 7219 LED matrix using 'max7219test_scrol' which is included as an example in Max7219-master library. During compilation, it first showed the error 'prog_uchar' does not name a type. Then I changed the 'prog_uchar' with 'const char' as suggested in the fourm. Now when compiling error message 'Error compiling for board 'Arduino Genuino/Uno' appears. What could be wrong? I've attached the code and error message.

max7219test_scrol.ino (9.27 KB)

error.doc (11.4 KB)

I see no attached error message

sorry. that was in docx format. now i've attached the error message in doc format

justinjohn:
sorry. that was in docx format. now i've attached the error message in doc format

Please post it here in code tags as described in read this before posting a programming question

Just use an ordinary text file instead of doc/docx/ whatever.

@UKHeliBob, the error might be too big to post inline.

the error might be too big to post inline.

Arduino: 1.8.9 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '176' from 'int' to 'char' inside { } [-Wnarrowing]

 };

 ^

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '128' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '190' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '152' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '164' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '164' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '128' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '132' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '252' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '252' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '156' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '160' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\Desktop\max7219test_scrol\max7219test_scrol.ino:125:1: warning: narrowing conversion of '160' from 'int' to 'char' inside { } [-Wnarrowing]

C:\Users\Justi\AppData\Local\Temp\ccylwW3j.ltrans0.ltrans.o: In function `printCharWithShift':

C:\Users\Justi\Desktop\max7219test_scrol/max7219test_scrol.ino:178: undefined reference to `MaxMatrix::writeSprite(int, int, unsigned char const*)'

C:\Users\Justi\Desktop\max7219test_scrol/max7219test_scrol.ino:179: undefined reference to `MaxMatrix::setColumn(unsigned char, unsigned char)'

C:\Users\Justi\Desktop\max7219test_scrol/max7219test_scrol.ino:184: undefined reference to `MaxMatrix::shiftLeft(bool, bool)'

C:\Users\Justi\AppData\Local\Temp\ccylwW3j.ltrans0.ltrans.o: In function `__static_initialization_and_destruction_0':

C:\Users\Justi\Desktop\max7219test_scrol/max7219test_scrol.ino:133: undefined reference to `MaxMatrix::MaxMatrix(unsigned char, unsigned char, unsigned char, unsigned char)'

C:\Users\Justi\AppData\Local\Temp\ccylwW3j.ltrans0.ltrans.o: In function `setup':

C:\Users\Justi\Desktop\max7219test_scrol/max7219test_scrol.ino:148: undefined reference to `MaxMatrix::init()'

C:\Users\Justi\Desktop\max7219test_scrol/max7219test_scrol.ino:149: undefined reference to `MaxMatrix::setIntensity(unsigned char)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Uno.

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

[quote author=justinjohn link=msg=4276715 date=1565936364which is included as an example in Max7219-master library.
[/quote]
Please post a link (using the chain links icon on the forum toolbar to make it clickable) to where you downloaded that library from.

C:\Users\Justi\Desktop\max7219test_scrol/max7219test_scrol.ino:178: undefined reference to `MaxMatrix::writeSprite(int, int, unsigned char const*)'

C:\Users\Justi\Desktop\max7219test_scrol/max7219test_scrol.ino:179: undefined reference to `MaxMatrix::setColumn(unsigned char, unsigned char)'

C:\Users\Justi\Desktop\max7219test_scrol/max7219test_scrol.ino:184: undefined reference to `MaxMatrix::shiftLeft(bool, bool)'

It looks like the library MaxMatrix is not being included in the compile.

Installing a ZIP library

Pieter

justinjohn:
During compilation, it first showed the error 'prog_uchar' does not name a type. Then I changed the 'prog_uchar' with 'const char' as suggested in the fourm.

You can get rid of the "warning: narrowing conversion" messages by changing "const char" to "const byte" for that array. char is a signed 8-bit number, which has a maximum value of 127. byte is an unsigned 8-bit number, and has a maximum value of 255.

The other errors are likely caused by either having the wrong library, or the wrong version of the library, installed.

Thank you all for the suggestions. My problem with compilation was solved when I reinstalled the Arduino IDE software.
I'm using a 4 block 7219 array of display. Now the scrolling is happening, but, it go scrolls vertically.. not horizontally..