[fpc-pascal]Graphics cards, VGALIB

Olle Raab olle.r at automagika.se
Mon Sep 6 15:35:43 CEST 2004


04-09-06 15.06, skrev Eduardo Morras följande:

> At 11:19 06/09/2004, you wrote:
> 
>> On 6 sep 2004, at 09:28, Marco van de Voort wrote:
>> 
>>>> Especially in case the linker supports multiple namespaces and
>>>> one package needs symbol X from library A, and another one from library
>>>> B.
>>> 
>>> There is always some directed graph in dependancies that can be translated
>>> into weights. But true, this kind of problems make having one weightfile
>>> a bit difference (since e.g. Mac OS X will probably be different).
>> 
>> No, it's not per system, but per package/program. Suppose there are
>> libraries A and B which both export symbol X. One program needs symbol X
>> from library A, and another one from library B, but both need both
>> libraries A and B for other symbols.
>> 
>> You then simply cannot assign a weight to A and B so that it works
>> correctly in all cases.
>> 
>> 
>> Jonas
> 
> I always thought that fpc supports a.x and b.x for differenciating them,
> but never used it. Perhaps even a type definition in your program as
> 
> type
> Graphic = a.x;
> Incognite = b.x;
> 
> allows you use both without any problem.
> 
> P.S. From freepascal.com/advantage.html; Is this still true??
> 
> "Each unit has it's own identifiers In Pascal you never need to worry about
> polluting the namespace, like in C where an identifier needs to be unique
> accross the entire program. No, in Pascal each unit gets it's own namespace
> and that's very relaxed."

Yes it is still true. FPC generates unique names for the linker.

The problem mentioned in this thread occur when linking to software written
in C.

Olle





More information about the fpc-pascal mailing list