How to add includepath in Arduino IDE?

Hi, all:

I've got 2 very simple questions:

  1. In the Arduino IDE, how to add includepath, so that my code is able to search in that folder as default?

  2. In Makefile, how to define includepath? So that my code is able to be compiled with those included paths?
    I tried to put

INCLUDEPATH = ~/MyPrograms/Arduino/

in my Makefile, for there are some .h files under ~/MyPrograms/Arduino/ that I'd love to use. However, when I tried to make, it reports that I'm not able to find some header files.

Well, any solutions?

  1. In the Arduino IDE, how to add includepath, so that my code is able to search in that folder as default?

You can't. You could explicitly define where the file is:

#include "C:\Temp\Crap\myHeader.h"

Thanks...
Are you around Seattle? :slight_smile: I'm just at Surrey, BC.
Is there any robotic club or some association or any activities down there? I'd love to join you when I've got time.

:slight_smile:
Thank you again.

Cheers
Pei

PaulS:

  1. In the Arduino IDE, how to add includepath, so that my code is able to search in that folder as default?

You can't. You could explicitly define where the file is:

#include "C:\Temp\Crap\myHeader.h"