sudar / Arduino-Makefile

Makefile for Arduino sketches. It defines the workflows for compiling code, flashing it to Arduino and even communicating through Serial.
http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile
GNU Lesser General Public License v2.1
2.02k stars 449 forks source link

fatal error: No such file or directory #647

Open ghost opened 3 years ago

ghost commented 3 years ago

There was a similar thread but for me the problem is that there are multiple libs and it seems one wants to use a header from the another and that results a file not found.

BOARD_TAG = promicro
ALTERNATE_CORE    = SparkFun
BOARD_SUB = 16MHzatmega32U4
ARDUINO_PORT = /dev/ttyACM0
USER_LIB_PATH = /home/arduino/sketchbook/libraries
ARDUINO_DIR = /opt/arduino
include /home/arduino/sketchbook/Arduino-Makefile/Arduino.mk

I have these includes (order doesn't matter):

#include <SPI.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

I have the libraries in the right path: /home/arduino/sketchbook/libraries This way I always get:

/home/arduino/sketchbook/libraries/MD_Parola/src/MD_Parola.h:428:10: fatal error: MD_MAX72xx.h: No such file or directory
 #include <MD_MAX72xx.h>
          ^~~~~~~~~~~~~~
compilation terminated.

Note here:

-                      ARDUINO_LIBS =
- [USER]                 MD_Parola
- [PLATFORM]             SPI

It seems it does not "detect" that library for some reason but if I go in the files and manually enter:

include "/home/arduino/sketchbook/libraries/MD_MAX72XX/src/MD_MAX72xx.h"

that's acceptable but ugly because I have to change it on many places.