Hello Tim.

OK, many thanks for your light.


Fre;D


De : fpc-pascal-boun...@lists.freepascal.org 
<fpc-pascal-boun...@lists.freepascal.org> de la part de Tim Veldhuizen 
<t...@timveldhuizen.nl>
Envoyé : samedi 11 février 2017 06:04
À : fpc-pascal@lists.freepascal.org
Objet : Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?

Unit names are considered to be unique, so strictly, for the compiler
there is no need to specify the path explicitly in code when the unit
path is given to the compiler when calling it from the command line.

To do this, use the -Fu parameter when calling fpc to include ../src to
the unit path.

Greetings,
Tim Veldhuizen.

On 11/02/17 04:07, fredvs wrote:
> Hello.
>
> There is myprogram.pas in /home/me/myproject/example.
>
> This program uses myunit.pas from /home/me/myproject/src.
>
> myunit.pas uses myunit2.pas and myunit3.pas that are also in
> home/me/myproject/src.
>
> Using this:
>
> program myprogram;
> ...
> uses myunit in '../src/myunit.pas';
>
> load indeed /home/me/myproject/src/myunit.pas but there are error messages
> because myunit.pas does not find the units that are in uses section.
>
> Here myunit.pas:
>
> unit myunit;
> ...
> uses myunit2, myunit3;
> ...
>
> How to do ?
>
> Thanks.
>
> Fre;D
>
>
>
>
> -----
> Many thanks ;-)
> --
> View this message in context: 
> http://free-pascal-general.1045716.n5.nabble.com/uses-myunit-in-src-myunit-pas-tp5727626.html
Free Pascal - General - uses myunit in '../src/myunit.pas' 
?<http://free-pascal-general.1045716.n5.nabble.com/uses-myunit-in-src-myunit-pas-tp5727626.html>
free-pascal-general.1045716.n5.nabble.com
uses myunit in '../src/myunit.pas' ?. Hello. There is myprogram.pas in 
/home/me/myproject/example. This program uses myunit.pas from 
/home/me/myproject/src. myunit.pas uses myunit2.pas and...



> Sent from the Free Pascal - General mailing list archive at Nabble.com.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
fpc-pascal Info 
Page<http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal>
lists.freepascal.org
NOTE ***** Due to incidents with spambots subscribing to the list and spamming 
it, your first message(s) may be delayed a bit before ...




_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
fpc-pascal Info 
Page<http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal>
lists.freepascal.org
NOTE ***** Due to incidents with spambots subscribing to the list and spamming 
it, your first message(s) may be delayed a bit before ...



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to