pixelmatix / AnimatedGIFs

MIT License
62 stars 34 forks source link

fatal error: SmartLEDShieldV4.h: No such file or directory compilation terminated. #23

Closed PeideSuperman closed 5 years ago

PeideSuperman commented 5 years ago

I am doing this SmartMatrix Animated GIF Player project. I am using Teensy 3.2 and SmartLEDShieldV4. I do exactly what the tutorial says but I found trouble with the coding part as far as I can tell. When I try to upload the code there is an error occur:

Arduino: 1.8.7 (Mac OS X), TD: 1.44, Board: "Teensy 3.2 / 3.1, Serial, 48 MHz, Faster, US English"

/var/folders/b2/jvwmq0k57jb1nnv1ns3pc7b40000gn/T/arduino_modified_sketch_14655/AnimatedGIFs.ino:60:57: fatal error: SmartLEDShieldV4.h: No such file or directory compilation terminated. Error compiling for board Teensy 3.2 / 3.1.

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

Thanks!

bboyho commented 5 years ago

I happened to come across this when looking for something else. That Arduino compile error is common when a library is not installed in the correct folder. It sounds like you might not have installed the SmartMatrix library in the correct location on your computer if SmartLEDShieldV4.h is not recognized. When testing this out on on a Mac iOS v10.13.6 (with the Arduino v1.8.7 and Teensyduino v1.44), I had no issues compiling the AnimatedGIF.ino file. You can obtain the associated library through the Arduino Library Manager from the menu by selecting Sketch > Include Library > Manage Libraries.... Search for SmartMatrix3.

Otherwise, I would try uninstall/reinstall the:

PeideSuperman commented 5 years ago

I happened to come across this when looking for something else. That Arduino compile error is common when a library is not installed in the correct folder. It sounds like you might not have installed the SmartMatrix library in the correct location on your computer if SmartLEDShieldV4.h is not recognized. When testing this out on on a Mac iOS v10.13.6 (with the Arduino v1.8.7 and Teensyduino v1.44), I had no issues compiling the AnimatedGIF.ino file. You can obtain the associated library through the Arduino Library Manager from the menu by selecting Sketch > Include Library > Manage Libraries.... Search for SmartMatrix3.

Otherwise, I would try uninstall/reinstall the:

  • Arduino IDE
  • Teensyduino add-on
  • SmartMatrix Library

Thank you for your help. As you said, I have the SmartMatrix3 installed but more errors occur:

Arduino: 1.8.7 (Mac OS X), TD: 1.44, Board: "Teensy 3.2 / 3.1, Serial, 48 MHz, Faster, US English"

In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:78:0: warning: "color_chan_t" redefined

define color_chan_t uint8_t

^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:37:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/MatrixCommon.h:98:0: note: this is the location of the previous definition

define color_chan_t uint16_t

^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:36:11: error: redefinition of 'const int textLayerMaxStringLength' const int textLayerMaxStringLength = 50; ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:39:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/Layer_Scrolling.h:31:11: note: 'const int textLayerMaxStringLength' previously defined here const int textLayerMaxStringLength = 100; ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:38:14: error: multiple definition of 'enum ScrollMode' typedef enum ScrollMode { ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:39:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/Layer_Scrolling.h:33:14: note: previous definition here typedef enum ScrollMode { ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:45:3: error: conflicting declaration 'typedef int ScrollMode' } ScrollMode; ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:39:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/Layer_Scrolling.h:40:3: note: previous declaration as 'typedef enum ScrollMode ScrollMode' } ScrollMode; ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:57:14: error: multiple definition of 'enum fontChoices' typedef enum fontChoices { ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/Layer_Scrolling.h:45:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:39, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/MatrixFontCommon.h:48:14: note: previous definition here typedef enum fontChoices { ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:64:3: error: conflicting declaration 'typedef int fontChoices' } fontChoices; ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/Layer_Scrolling.h:45:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:39, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/MatrixFontCommon.h:55:3: note: previous declaration as 'typedef enum fontChoices fontChoices' } fontChoices; ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:68:16: error: redefinition of 'struct rgb24' typedef struct rgb24 { ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:37:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/MatrixCommon.h:39:16: error: previous definition of 'struct rgb24' typedef struct rgb24 { ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:72:3: error: conflicting declaration 'typedef int rgb24' } rgb24; ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:37:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/MatrixCommon.h:50:3: note: previous declaration as 'typedef struct rgb24 rgb24' } rgb24; ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:92:14: error: multiple definition of 'enum rotationDegrees' typedef enum rotationDegrees { ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:37:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/MatrixCommon.h:229:14: note: previous definition here typedef enum rotationDegrees { ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix_32x32.h:6:0, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:66: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/SmartMatrix.h:97:3: error: conflicting declaration 'typedef int rotationDegrees' } rotationDegrees; ^ In file included from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:37:0, from /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5, from /Users/lianghe/Documents/Arduino/AnimatedGIFsSSSSS/AnimatedGIFsSSSSS.ino:60: /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/src/MatrixCommon.h:234:3: note: previous declaration as 'typedef enum rotationDegrees rotationDegrees' } rotationDegrees; ^ Multiple libraries were found for "SD.h" Used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD Not used: /Applications/Arduino.app/Contents/Java/libraries/SD FilenameFunctions.cpp: In function 'int enumerateGIFFiles(const char, boolean)': FilenameFunctions.cpp:40: warning: unused variable 'name' char name; ^ GIFParseFunctions.cpp: In function 'void parseTableBasedImage()': GIFParseFunctions.cpp:493: warning: comparison between signed and unsigned integer expressions if(offset + dataBlockSize <= sizeof(lzwImageData)) { ^ Error compiling for board Teensy 3.2 / 3.1.

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

I am trying to uninstall/reinstall.

embedded-creations commented 5 years ago

Looks like you have multiple SmartMatrix Library copies:

/Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/ /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/

PeideSuperman commented 5 years ago

Looks like you have multiple SmartMatrix Library copies:

/Users/lianghe/Documents/Arduino/libraries/SmartMatrix_32x32/ /Users/lianghe/Documents/Arduino/libraries/SmartMatrix3/

Arduino: 1.8.7 (Mac OS X), TD: 1.44, Board: "Teensy 3.2 / 3.1, Serial, 48 MHz, Faster, US English"

/var/folders/b2/jvwmq0k57jb1nnv1ns3pc7b40000gn/T/arduino_modified_sketch_220345/AnimatedGIFs.ino:60:30: fatal error: SmartLEDShieldV4.h: No such file or directory compilation terminated. Error compiling for board Teensy 3.2 / 3.1.

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

I deleted one of them.

embedded-creations commented 5 years ago

Which one? Maybe you deleted the wrong one. You might just want to delete both, and use the Arduino Library Manager to download SmartMatrix3 (and not SmartMatrix_32x32)

PeideSuperman commented 5 years ago

Which one? Maybe you deleted the wrong one. You might just want to delete both, and use the Arduino Library Manager to download SmartMatrix3 (and not SmartMatrix_32x32)

Thanks to your help, I download the latest library and the problem solves.