Skip to content

Import Search Path

IsaacShelton edited this page Mar 21, 2022 · 1 revision

Import Search Path

By default, the import search path contains two entries:

  • The parent folder of the current file
  • The import folder alongside the adept executable

When a file is imported, the compiler will look in each location, going from top to bottom, to try to find it.

The first file that's found is used.

Exceptions

The above only applies to imports that aren't import component or #import <component>, since those only look in the standard library folder.

Adding Import Paths

Paths can be added to the end of the list, by using either pragma search_path, or -I<PATH>

Clone this wiki locally