[PD-dev] C++ templates - question

Georg Holzmann grhPD at gmx.at
Tue Oct 12 16:29:25 CEST 2004


Hi List, hi C++Experts!

I have a problem with C++-Templates.
I currently try to implement all the C++ STL-Containers and decided to make
it with templates, because a lot of them have the same methods.
The attached program is only the map (I know it's the same as pool, but
there will follow the other containers...).

The problem:
Everything compiles fine, but in PD:
/win/Georg/PD-Externals/PDContainer/h_map.pd_linux:
/win/Georg/PD-Externals/PDContainer/h_map.pd_linux: undefined symbol:
_ZN12TPDContainerISt3mapI7Element5_atom7CompareSaISt4pairIKS1_S2_EEESt17_Rb_tree_iteratorIS6_RS6_PS6_EE8clearAllEv
 h_map
... couldn't create

a c++filt gives me the method:
c++filt
_ZN12TPDContainerISt3mapI7Element5_atom7CompareSaISt4pairIKS1_S2_EEESt17_Rb_tree_iteratorIS6_RS6_PS6_EE8clearAllEv
TPDContainer<std::map<Element, _atom, Compare,
std::allocator<std::pair<Elementconst, _atom> > >,
std::_Rb_tree_iterator<std::pair<Element const, _atom>, std::pair<Element
const, _atom>&, std::pair<Element const, _atom>*> >::clearAll()

This method is in the Base Class TPDContainer and the map (class HMap)
should have access to this method!
If I override this method directly in class HMap the undifined symbol is in
the method from the Base class TPDContainer.

Maybe it is a real trivial problem and some C++Expert could point me to it
(or maybe the makefile should be modified ?)

Thanks for any help,

LG
Georg

-- 
+++ GMX DSL Premiumtarife 3 Monate gratis* + WLAN-Router 0,- EUR* +++
Clevere DSL-Nutzer wechseln jetzt zu GMX: http://www.gmx.net/de/go/dsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PDContainer.zip
Type: application/zip
Size: 18558 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20041012/b0a8c666/attachment.zip>


More information about the Pd-dev mailing list