Re: Undefined reference to C++ template static data members

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

 



Thanks for the comment Axel.

You are indeed correct, the initialisation of the array was incorrect.

When I changed

template <> DiffservService 
ServiceManager<DiffservService,DiffservServiceId,MAX_SERVICE_DS>::s_all[
MAX_SERVICE_DS ]; 

to

template <> DiffservService 
ServiceManager<DiffservService,DiffservServiceId,MAX_SERVICE_DS>::s_all[
MAX_SERVICE_DS ] = { };

The link error went away.

Cheers

Arthur



-- 
View this message in context: http://old.nabble.com/Undefined-reference-to-C%2B%2B-template-static-data-members-tp28841884p28879095.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[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