<div dir="ltr">On Sat, Nov 2, 2013 at 12:19 PM, Marcos Douglas <span dir="ltr"><<a href="mailto:md@delfire.net" target="_blank">md@delfire.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sat, Nov 2, 2013 at 12:32 PM, Dmitry Boyarintsev<br>
<div><div class="h5"><<a href="mailto:skalogryz.lists@gmail.com">skalogryz.lists@gmail.com</a>> wrote:<br>
><br>
> On Sat, Nov 2, 2013 at 6:55 AM, Marcos Douglas <<a href="mailto:md@delfire.net">md@delfire.net</a>> wrote:<span style="color:rgb(34,34,34)"> </span></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This works only if you don't want use StrUtils of your project and,<br>
IMHO, this is more complex solution. You will need to tell the<br>
compiler which unit of your project that compiles using an unit in<br>
another place that uses the same unit name you already uses in your<br>
project.<br></blockquote><div>Not each unit. The search priority can be adjusted for a directory (3d party library) </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The "rules" that I proposed are:<br>
1- Sources in the same directory and/or own tree are compiled using<br>
the "real names" of units.<br>
2- Sources in another tree are (optional) compiled using an "alias".<br>
These alias are used as a prefix to real names of units.<br></blockquote><div>I guess, you need to define "in the same" directory. Is it "the same" to a project or to a unit?</div><div>If to "a unit" then it breaks the compiler backward compatibility.</div>
<div>So, how to handle the following case?</div><div><br></div><div>/program/unit1.pas (uses TheLib.StrUtils)</div><div>/program/unit2.pas (uses StrUtils from program)</div><div>/program/StrUtils.pas</div><div>/lib/StrUtils.pas</div>
<div>/otherlib/otherlibunit.pas (depends on "lib" StrUtils)</div><div><br></div><div>So how would you "otherlibunit" to be using TheLib.StrUtils? From what I can understand (following rule #2), you need to modify "otherlibunit.pas" and change "uses StrUtils" to "uses TheLib.StrUtils"</div>
<div><br></div><div>thanks,</div><div>Dmitry</div></div></div></div>