Re: Include problems

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

Tommy Carlier wrote:

> I have a problem with the include-statement.
> I'm creating a package of libraries, some documentation on how to use
> them, and some demos. I've put these in 3 different sub-folders of a
> common folder:
>
> main
> +- include (contains: smelptyp.e, smelpars.e, smeldoc.e, smelwrit.e)
> +- doc (contains: *.htm, *.css)
> +- demos (contains: test.ex, test2.ex, test3.ex, *.smel)
>
> In the 'main\include'-folder, I've put all the libraries. In the
> 'main\demos'-folder, I've put all the demo-applications.
>
> In a demo-application, I include one of the libraries:
>
> -- test.ex
> include "..\\include\\smelpars.e"
>
> In 'main\include\smelpars.e', I include a different library in the same
> folder ('main\include\smelptyp.e'), like this:
>
> -- smelpars.e
> include "smelptyp.e"
>
> When I try to run that demo, I get an error: smelpars.e has been found,
> but smelptyp.e not, because it's not in the same folder as the
> demo-application,

In the past, I made the same experience.
Obviously, Euphoria interprets the file name "smelptyp.e" relative to
the location of the file of the main program, not relative to the
location of the file that is _directly_ including it.

> it's not in one of the EUINC-folders, and it's not in
> 'c:\Euphoria\include'.
>
> My temporary solution is to put all the files (libraries and demos) in
> the same folder. Is there any other solution?
>
> Request for Euphoria 2.5/3.0:
> Every time a library is included, temporarily add the folder of the
> library to the search-path.

... or interpret names of included files like "smelptyp.e" (that don't
contain an absolute path, like "c:\smelptyp.e") relative to the location
of the file that is _directly_ including it.

Please, please, please. smile
This would make the include system much more flexible and comfortable.

Regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |    |\      _,,,---,,_
 \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
  X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
 / \  and unneeded MIME     |  '---''(_/--'  `-'\_)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu