On Sat, Nov 2, 2013 at 12:19 PM, Marcos Douglas <m...@delfire.net> wrote:
> On Sat, Nov 2, 2013 at 12:32 PM, Dmitry Boyarintsev > <skalogryz.li...@gmail.com> wrote: > > > > On Sat, Nov 2, 2013 at 6:55 AM, Marcos Douglas <m...@delfire.net> wrote: > This works only if you don't want use StrUtils of your project and, > IMHO, this is more complex solution. You will need to tell the > compiler which unit of your project that compiles using an unit in > another place that uses the same unit name you already uses in your > project. > Not each unit. The search priority can be adjusted for a directory (3d party library) > The "rules" that I proposed are: > 1- Sources in the same directory and/or own tree are compiled using > the "real names" of units. > 2- Sources in another tree are (optional) compiled using an "alias". > These alias are used as a prefix to real names of units. > I guess, you need to define "in the same" directory. Is it "the same" to a project or to a unit? If to "a unit" then it breaks the compiler backward compatibility. So, how to handle the following case? /program/unit1.pas (uses TheLib.StrUtils) /program/unit2.pas (uses StrUtils from program) /program/StrUtils.pas /lib/StrUtils.pas /otherlib/otherlibunit.pas (depends on "lib" StrUtils) 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" thanks, Dmitry
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal