[Aldor-l] different libraries that contain files with same name
Ralf Hemmecke
ralf at hemmecke.de
Wed Nov 28 10:21:06 EST 2007
On 11/27/2007 09:05 PM, Laurentiu Dragan wrote:
> Ralf Hemmecke wrote:
>> Hello,
>>
>> maybe all of you know, but I would really like to know why there is
>> this restriction that I cannot have two libraries that contain the
>> same filename. Why does the file name in different object libraries
>> matter at all?
>
> The restriction is in the way Aldor treats libraries. In Aldor, .al
> files are collections of "libraries". For example, libaldor.al
> contains sal_lang.ao library, sal_base.ao library, and others. Each
> such library has an
> initialization function which is identified by name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
No problem.
> and the name is built from the name of the file.
Why is that? Is there a need to do it that way or can it also be done
otherwise without knowledge of the filename?
Do you see a way of getting away with that restriction?
> So, you cannot have two "Aldor libraries" with the same name and use
> them at the same time, even if they are in different .al or .a file.
It's hypothetical, but imagine you buy a big aldor library from one
company and another one from another company.
Both work on non-intersecting areas and have no domain in common.
You have written a big program that uses both of these libraries.
Now, for some reason, one company renames a file to foo.ao so that
(accidently) it agrees with the name of a file in the other library.
What would you do if you realize that you've spent lots of money to
develop your program, lots of money for the two libraries and now you
cannot use both libraries to build the program you want?
Even in an opensource development model that is an unacceptable restriction.
>> Any suggestion for a workaround?
> Yes, change the name of the file :) (use a prefix for files that are
> supposed to be used in a library, see sal_* or sit_*)!
OK do it for these closed-source libraries, I mentioned above. ;-)
Any better solution?
Ralf
More information about the Aldor-l
mailing list