[Aldor-l] different libraries that contain files with same name

Laurentiu Dragan ldragan at aldor.org
Tue Nov 27 15:05:18 EST 2007


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 and the name 
is built from the name of the file. 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.

> 
> This problem does not occur for pure C code see below.

That's because .o files are just collections of symbols from the C 
source file, no extra initialization functions that depends on the name 
of the file.

> 
> 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_*)!

--
Laurentiu




More information about the Aldor-l mailing list