Aliasing specialized template stuct in his module leads troubles

Rob T alanb at ucora.com
Sat Mar 2 01:12:53 PST 2013


On Saturday, 2 March 2013 at 03:59:59 UTC, H. S. Teoh wrote:
> On Sat, Mar 02, 2013 at 04:17:10AM +0100, Rob T wrote:
>> In my case, the problem had to do with the order in which I was
>> linking my static libs, simply changing the order resolved the
>> undefined references. Turns out it's a common problem when 
>> working
>> with static libs and it's unrelated to D.
> [...]
>
> It's the linker's fault, not any compiler's. Symbols are 
> resolved
> according to the order of modules you specify on the 
> command-line, so
> order does matter, unfortunately.
>
> IMNSHO this is a silly design -- in this day and age, one 
> would've
> expected better algorithms than that for linking -- but that's 
> how it is
> right now.
>
>
> T

Maybe 20 years ago there was not enough cpu power to go around, 
but not anymore, so one would think this kind of problem could 
easily be resolved. It seems though, that most often dynamically 
loaded libs are used, not static, so perhaps the problems with 
static libs are due to it being not enough of a priority. 
Personally I prefer dynamically loaded libs and as soon as D 
supports it I'll be using them again almost exclusively.

--rt


More information about the Digitalmars-d-learn mailing list