Re: include paths

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi,

>I think the interpreter should include in its search path for include files
>the current directory (or folder) of the file currently being read, plus it
>should use some sort of path statement to find include files in a wide
>variety of directories.
>
>I just switched to win32lib version 0.55, which includes files
>tk_something.e, one or more of which in turn include w32keys.e. Now, all of
>these files are together in their own directory, where I wish to keep them.
>But no, either I have to change the source to include explicit paths, or
>move them into either the \euphoria\include directory or my main project
>directory. This is an irritant.

Yes I have had this problem as well.  Also you want to keep multiple
versions of the library ... the only way to do this know is to copy
all the include files into every directory where you want it to be used.

>
>In contrast, most C compilers (and I suspect, other languages as well)
allow
>you to list the all folders where include files might be found, and search
>all the specified folders. Limiting includes to
>1. the \euphoria\include directory;
>2. the user's project directory; and
>3. paths given explicitly in the source
>seems unreasonably hampering.

My proposal would be:

Allow the runtimes to use a -I switch or environment variable like C:

eg.  exw -Ic:\euphoria\include\win32lib.54 test.exw

or set EUINCLUDE=c:\euphoria\include\win32lib.54
   exw test.exw

The -I or EUINCLUDE can contain semicolon seperated paths.
(or colon on unix?  What is the standard for cross platform projects?)

eg. EUINCLUDE=c:\euphoria\my_includes;h:\share\euphoria\includes;

Then the search path presidence would be:

1. Current Directory
2. Any directories specified with -I
3. Any directories specified with EUINCLUDE environment variabe
4. The standard include directory (%EUDIR%\include)

Any other ideas?

Ray Smith

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu