2

can Arduino IDE point to a file in another directory? If yes how? With my code

../../main.h

the compile fails.

Error:

In file included from D:\Eigene Dateien\Entwicklung\SIGNALDuino_MR\src\arduino-ide\SIGNALDuino\SIGNALDuino.ino:1:0:

main.h:1:1: error: expected unqualified-id before '.' token

 ../../main.h

 ^

exit status 1
expected unqualified-id before '.' token

--------------- structure ------------------

TEST
  |--main.h
  |-----Ordner 1
             |-----Ordner 3
                       |--files.h
  |-----Ordner 2
             |-----Ordner 4
10
  • 1
    No it doesn't work. The file exists in the directory (2 times back in the structure) :-( #include "../../main.h" ^ compilation terminated. exit status 1 ../../main.h: No such file or directory Feb 12 '20 at 13:02
  • 1
    But he should read the file from there :-( No absolute position should be given. The file is 2 levels up. Feb 12 '20 at 13:14
  • 1
    to avoid misunderstandings, it is a path \ src \ which has the first main.h. This contains the structure \ arduino-ide \ project \ where the main.h file is located. This should call the "first" main.h. Feb 12 '20 at 13:32
  • 1
    The answer is in the wrong direction. The user wants from MCUa.ino in TimerLib.h. But my plan is backwards. Jump back directories. Based on the example, from TimerLib.h to MCUa.ino Feb 12 '20 at 15:06
  • 1
    read the answer to the other question.
    – Juraj
    Feb 12 '20 at 15:15

Browse other questions tagged or ask your own question.