Template function in LinkDef.h

From: OKUMURA, Akira <oxon_at_ceres.phys.s.u-tokyo.ac.jp>
Date: Fri, 27 Jun 2008 16:05:29 -0700


Hello ROOTers,

I get warnings when I create a dictionary for my library.

$ rootcint -f src/RootHealPixDict.cxx -c -p include/THealAlm.h include/ THealAlmMapTools.h include/THealFFT.h include/THealPix.h include/ THealUtil.h include/LinkDef.h
Warning: #pragma link, function
Map2Alm(THealPix&,THealAlm<Float_t>&,std::vector<Double_t>&,Bool_t) not found include/LinkDef.h:56:
Warning: #pragma link, function
Map2Alm(THealPix&,THealAlm<Double_t>&,std::vector<Double_t>&,Bool_t) not found include/LinkDef.h:57:

Because of this warnings, I cannot call THealAlmMapTools::Map2Alm from the root command line even though I succeeded in loading my library. These functions are written in THealAlmMapTools.h and .cxx. I do not understand why only Alm2Map works while Map2Alm doesn't.

How should I modify my codes? I am using ROOT 5.20.00 on Mac OS X Leopard (Intel).

namespace THealAlmMapTools {

   template<typename T> void Alm2Map(const THealAlm<T>& alm, THealPix& map);

   template<typename T> void Map2Alm(const THealPix& map, THealAlm<T>& alm, const std::vector<Double_t>& weight, Bool_t add_alm); }

namespace THealAlmMapTools {

template<typename T> void Alm2Map(const THealAlm<T>& alm, THealPix& map) {
(snip)
}
template<typename T> void Map2Alm(const THealPix& map, THealAlm<T>& alm, const std::vector<Double_t>& weight, Bool_t add_alm) {
(snip)
}

template void Alm2Map(const THealAlm<Float_t>& alm, THealPix& map);
template void Alm2Map(const THealAlm<Double_t>& alm, THealPix& map);
template void Map2Alm(const THealPix& map, THealAlm<Float_t>& alm,  
const std::vector<Double_t>& weight, Bool_t add_alm); template void Map2Alm(const THealPix& map, THealAlm<Double_t>& alm, const std::vector<Double_t>& weight, Bool_t add_alm);

}
Regards,

OKUMURA, Akira oxon_at_ceres.phys.s.u-tokyo.ac.jp Department of Physics, The University of Tokyo 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
TEL/FAX +81 3-5841-4173/4059
Skype : okumura.akira Received on Sat Jun 28 2008 - 01:05:50 CEST

This archive was generated by hypermail 2.2.0 : Sat Jun 28 2008 - 05:50:08 CEST