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

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

 



I have made a small bit of progress, when I changed

template <class Service, class ServiceId, UOPT16 NumberOfServices> Service*
ServiceManager<Service, ServiceId, NumberOfServices>::s_used = 0;

To be

template <> DiffservService*
ServiceManager<DiffservService,DiffservServiceId,MAX_SERVICE_DS>::s_used =
0;

The some error went away, however there are still errors with the static
s_all array, the linker is not complaring about the non array static
template members any more. But I am still left with a problem on

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

/cygdrive/s/ipw_products/sw_dev/common/pdc/tgt/rni/ose_ppc/./obj_app//pdc_rni.a(PDCProtocol.o):
In function `ServiceManager<DiffservService, DiffservServiceId,
100ul>::release()':
../../../incl/ServiceManager.cxx:265: undefined reference to
`ServiceManager<DiffservService, DiffservServiceId, 100ul>::s_all'
../../../incl/ServiceManager.cxx:265: undefined reference to
`ServiceManager<DiffservService, DiffservServiceId, 100ul>::s_all'




-- 
View this message in context: http://old.nabble.com/Undefined-reference-to-C%2B%2B-template-static-data-members-tp28841884p28842497.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