diff -Nru ginac-1.5.8.orig/ginac/ex.h ginac-1.5.8.hack/ginac/ex.h --- ginac-1.5.8.orig/ginac/ex.h 2010-03-05 20:39:00 +0000 +++ ginac-1.5.8.hack/ginac/ex.h 2010-09-11 11:38:36 +0000 @@ -32,6 +32,11 @@ #include namespace GiNaC { +#ifdef _MSC_VER + // MSVC produces a different symbol for _ex0 when it is declared inside + // ex::is_zero() than when it is declared at top level as follows + extern const ex _ex0; +#endif /** Helper class to initialize the library. There must be one static object * of this class in every object file that makes use of our flyweights in @@ -204,7 +209,12 @@ // comparison int compare(const ex & other) const; bool is_equal(const ex & other) const; - bool is_zero() const { extern const ex _ex0; return is_equal(_ex0); } + bool is_zero() const { +#ifndef _MSC_VER + extern const ex _ex0; +#endif + return is_equal(_ex0); + } bool is_zero_matrix() const; // symmetry diff -Nru ginac-1.5.8.orig/ginac/parser/parse_binop_rhs.cpp ginac-1.5.8.hack/ginac/parser/parse_binop_rhs.cpp --- ginac-1.5.8.orig/ginac/parser/parse_binop_rhs.cpp 2010-03-05 20:39:00 +0000 +++ ginac-1.5.8.hack/ginac/parser/parse_binop_rhs.cpp 2010-09-11 11:50:30 +0000 @@ -114,7 +114,7 @@ } } -extern numeric* _num_1_p; +extern const numeric* _num_1_p; static ex make_minus_expr(const exvector& args) { diff -Nru ginac-1.5.8.orig/ginac/parser/parser.cpp ginac-1.5.8.hack/ginac/parser/parser.cpp --- ginac-1.5.8.orig/ginac/parser/parser.cpp 2010-07-06 12:39:14 +0000 +++ ginac-1.5.8.hack/ginac/parser/parser.cpp 2010-09-11 11:38:43 +0000 @@ -120,9 +120,6 @@ return e; } -extern numeric* _num_1_p; -extern ex _ex0; - /// unary_expr: [+-] expression ex parser::parse_unary_expr() {