Paths

A path list is a list of directory names separated by semicolons. Declare path names using the following Extended Backus-Naur Form (EBNF) syntax . Most environment variables contain path lists to direct the compiler to the file location as shown in the Listing: Environment Variable Path List with Four Possible Paths.

Listing: EBNF Path Syntax
PathList = DirSpec {; DirSpec}.
DirSpec  = [*] DirectoryName.
Listing: Environment Variable Path List with Four Possible Paths
GENPATH=C:\INSTALL\LIB;D:\PROJECTS\TESTS;/usr/local/lib;
/home/me/my_project

An asterisk ( * ) preceding a directory name instructs the program to recursively search the entire directory tree for a file, not just the given directory itself. The program searches the directories in the order of appearance in the path list.

Listing: Setting an Environment Variable using Recursive Searching
LIBPATH=*C:\INSTALL\LIB
Note: This procedure uses some DOS environment variables (like GENPATH or LIBPATH).

If you work with the CodeWright editor, you can set the environment using a <project>.pjt file in your project directory. This enables you to have different projects in different directories, each with its own environment.

Note: When using WinEdit, do not set the system environment variable DEFAULTDIR: Default Current Directory. If you do so, and this variable does not contain the project directory given in WinEdit's project configuration, files might not be placed where you expect them to be.