On 5/3/06, Sébastien <[EMAIL PROTECTED]> wrote:
Le Mercredi 3 Mai 2006 17:23, Stéphane Magnenat a écrit: > Very nice :-). Remember that as you use templates implemented in a cpp you > must force the specialization for types you want to use, otherwise you'll > have link problems. > > Steph > > > _______________________________________________ > glob2-devel mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/glob2-devel You mean like /home/sebastien/test/glob2/src/GameGUI.cpp:546: undefined reference to « FormatableString& FormatableString::arg<char const*>(char const* const&)» ? I solved the problem by putting theimplementation of arg in the header... What is the real solution ?
Thats how your supposed to do it, actually. There is an alternative I particularly like, is a .timpl file (or another simialir extention), that contains inline and template methods and functions, seperated from the header file, but included by the header file at the end.
_______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
_______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
