----- Original Message ----- <snip> > ./.libs/libaspell.so: undefined reference to > `acommon::HashTable<acommon::StringMap::Parms>::init(unsigned int)' > ./.libs/libaspell.so: undefined reference to > `acommon::HashTable<acommon::StringMap::Parms>::del()' > ./.libs/libaspell.so: undefined reference to > `acommon::BlockSList<acommon::StringPair>::clear()' > collect2: ld returned 1 exit status > > My C++ is a little rusty. Where are those methods defined? Why can't the > linker find them in the above case? Hi Richard, Short answer - They are defined in hash-t.hpp and block_slist-t.hpp.
Longer answer The HashTable and BlockSList classes are template classes. The actual code is generated by the compiler as needed. They are declared in hash.hpp and block_slist.hpp. However, some of their methods are defined in hash-t.hpp and block_slist-t.hpp. Why the separation? Why not define all the methods in one file? I believe the idea is that in many cases the definitions are not needed. When they are not, a module need only include hash.hpp. When they are, we include hash-t.hpp. The compiler I use had the same problems as you are experiencing. My response was to move from including hash.hpp to including hash-t.hpp. Yes, that gives the compiler more to do and negates the separation between declaration and definition, but I was able to get a successful build. _______________________________________________ Aspell-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/aspell-user
