RE: Template linker errors with gcc 4.6.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jonathan

Thanks for your help. 

Best regards

David

> -----Original Message-----
> From: Jonathan Wakely [mailto:jwakely.gcc@xxxxxxxxx]
> Sent: 04 November 2013 16:18
> To: David Aldrich
> Cc: gcc-help@xxxxxxxxxxx
> Subject: Re: Template linker errors with gcc 4.6.3
> 
> On 4 November 2013 16:08, David Aldrich wrote:
> > Hi
> >
> >> Are your function templates defined in the headers that EVD.cpp includes?
> >
> > Yes, EVD.cpp includes:
> >
> > #include "Matrix.h"
> >
> > and Matrix.h contains:
> >
> > template<class T> class Matrix : public MatrixBase {
> > public:
> >     <snip>
> >     static Matrix<T> eye( unsigned a_size, T a_scalingFactor=1.0 )
> DONT_INLINE;
> >     <snip>
> > }
> 
> Then that's the problem.  As I said, function templates must be defined in every
> file that uses them, or explicitly instantiated.
> 
> I don't know why your code worked previously, it looks invalid (if you don't have
> explicit instantiations in some other file.)
> 
> 
>  Click
> https://www.mailcontrol.com/sr/1pCGxKPEo37GX2PQPOmvUsaHTTHE2WHLTel
> TN!QmeCuZUHdHHxw+UX7EPQCPtTRzD80j2WpbjaKzR1Lppn2zgQ==  to report
> this email as spam.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux