[macstl-dev] linker error on VC7
Glen Low
glen.low at pixelglow.com
Sun Feb 27 15:15:05 WST 2005
>> Have you managed to get the benchmark or vectest suites to compile on
>> your IDE? The linker errors do look as if it's having problems with
>> partial specializations.
>>
> Yes the benchmark and vectest suite compile and runs fine. I get the
> error when I add a single source file to the benchmark suite project.
> Then it will no longer link for me.
>
Kyle:
Interesting.
An explicit specialization of a template function was not made inline,
causing an ODR (One Definition Rule) violation when you have more than
1 linked object file. Try changing:
boolean.h:50
From:
template <> float boolean_of <float> (bool b)
To:
template <> inline float boolean_of <float> (bool b)
boolean.h:60
From:
template <> double boolean_of <double> (bool b)
To:
template <> inline double boolean_of <double> (bool b)
See if that now compiles and links.
I'll have to weed out any other functions with the same problem, and
release that in the next version. Thanks for the report!
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
More information about the macstl-dev
mailing list