Library standardization

Bill Baxter dnewsgroup at billbaxter.com
Sat Apr 19 06:53:10 PDT 2008


e-t172 wrote:
> e-t172 a écrit :
>> So, I compile my shared library, version 1.0.1. When I install it on 
>> my system, all hell breaks loose: all the programs that were using 
>> foo() are crashing at startup because they do not find foo() in the 
>> shared library. What?! But I never changed my API?! How is that possible?
>>
>> There is clearly a problem here.
> 
> The same kind of problem arises if you release a general update of your 
> shared library without changing the API : the programs that uses the 
> shared library will use the updated versions if and only if those are 
> not inlined. This is normal, but because inlining a function is not a 
> the programmer's decision in D, the program will use an ugly and 
> unpredictable mix between updated and non-updated functions that will 
> inevitably lead to grave problems (DLL hell reloaded?).

There is an 'export' attribute that I think is supposed to be used to 
say that a function in a DLL is callable.
   http://www.digitalmars.com/d/1.0/attribute.html#ProtectionAttribute

Presumably this could cause implementation to not be included in a .di 
file.  I don't know if that happens currently, or not.


--bb



More information about the Digitalmars-d mailing list