Hello! On Mon, Nov 12, 2007 at 05:29:51PM +0100, jros wrote:
I have a problem compiling
http://www.ginac.de/viewcvs/GiNaC/doc/examples/mystring.cpp?rev=1.1
[snipped the error messages] This example is for GiNaC version 1.4. If you want to compile it with older version[s], apply the following patch: --- mystring.cpp 2007-11-05 12:28:19.062020000 +0300 +++ mystring_o.cpp 2007-11-12 20:52:20.752501247 +0300 @@ -9,6 +9,9 @@ #include <ginac/ginac.h> using namespace GiNaC; +// Make sure this does not collide with other classes' TINFOs. +static const unsigned TINFO_mystring = 666U; + class mystring : public basic { GINAC_DECLARE_REGISTERED_CLASS(mystring, basic) @@ -29,9 +32,9 @@ print_func<print_context>(&mystring::do_print)) // ctors -mystring::mystring() : inherited(&mystring::tinfo_static) { } -mystring::mystring(const string &s) : inherited(&mystring::tinfo_static), str(s) { } -mystring::mystring(const char *s) : inherited(&mystring::tinfo_static), str(s) { } +mystring::mystring() : inherited(TINFO_mystring) { } +mystring::mystring(const string &s) : inherited(TINFO_mystring), str(s) { } +mystring::mystring(const char *s) : inherited(TINFO_mystring), str(s) { } // comparison int mystring::compare_same_type(const basic &other) const Best regards, Alexei -- All science is either physics or stamp collecting.