Most of the bug is described here: http://bugs.gentoo.org/show_bug.cgi?id=96306 It seems to be a template instanciation problem. When I try to compile a program, I get this: test_suffix_node.o(.text+0x1bd): In function `main': : undefined reference to `cpl::internals::SuffixTree<int>::insert(int&, char const*)' test_suffix_node.o(.text+0x1c8): In function `main': : undefined reference to `cpl::internals::SuffixTree<int>::print_tree()' test_suffix_node.o(.text+0x215): In function `main': : undefined reference to `cpl::internals::SuffixTree<int>::key_exist(char const*)' test_suffix_node.o(.text+0x2b4): In function `main': : undefined reference to `cpl::internals::SuffixTree<int>::print_tree()' test_suffix_node.o(.gnu.linkonce.r._ZTVN3cpl9internals10SuffixNodeIiEE+0x8): undefined reference to `cpl::internals::SuffixNode<int>::~SuffixNode()' test_suffix_node.o(.gnu.linkonce.r._ZTVN3cpl9internals10SuffixNodeIiEE+0xc): undefined reference to `cpl::internals::SuffixNode<int>::~SuffixNode()' test_suffix_node.o(.gnu.linkonce.r._ZTVN3cpl9internals10SuffixTreeIiEE+0x8): undefined reference to `cpl::internals::SuffixTree<int>::~SuffixTree()' test_suffix_node.o(.gnu.linkonce.r._ZTVN3cpl9internals10SuffixTreeIiEE+0xc): undefined reference to `cpl::internals::SuffixTree<int>::~SuffixTree()'
Created attachment 9133 [details] code who causes the problem
This is not a bug, this is how C++ templates work. You want to include templates functions in the same TU as the where you use them. Unless you use export but export is not implemented yet.
hmmmm well. I made an include at the end of my file... it works now. But this is not a nice solution I find. Well, I'll continue that way for now, and wait for the export method to be implemented. I will also have a look at the gcc doc on that subject. Thanks for all.