Richard B. Kreckel
kreckel at thep.physik.uni-mainz.de
Sun Dec 26 11:51:03 CET 2004
On Wed, 22 Dec 2004, Qin An wrote:
> I have worked out this problem. Yes, that is the reason that the exponent 2 of the expression must
> be defined to integer type. I am sorry that I provided it is double type, 2.0 . However, the error
> message do not cast light on me clearly enough.
> by the way, I found the compile result is different between the kdevelop and the console compile
> command. For example,
> // test.cpp
> #include <iostream>
> #include <ginac/ginac.h>
> using namespace std;
> using namespace GiNaC;
> int main(int argc, char *argv)
> symbol x("x");
> ex exp = sin(x);
> cout << exp << endl;
> return EXIT_SUCCESS;
> that is ok when you typed the command: c++ test.cpp -o test -lcln -lginac , the result showed
> but on the kdevelop, the compiler will show you the error messages:
> /usr/local/include/ginac/container.h: In member function
> `GiNaC::container_storage<C>::STLT GiNaC::container<<anonymous template
> template parameter> >::evalchildren(int) const [with C = std::vector]':
> /usr/local/include/ginac/container.h:557: instantiated from `GiNaC::ex GiNaC::container<<anonymous
> template template parameter> >::eval(int) const [with C = std::vector]'
> /usr/local/include/ginac/container.h:130: instantiated from here
> /usr/local/include/ginac/container.h:708: exception handling disabled, use
> -fexceptions to enable
> That is same for asin,cos,acos, and so on.
> I think the error may be parameter type of the sin founction, because you definded the parameter of
> sin() is numeric type(that is smoothful when given the numeric type to x ). If I definded the x as
> numeric type, I have not given the ginac symbolic computing performance for trigonometric
> functions... That is so pity. I hope the symbolic computing performance will include the trigonometric
> Could you give me some advice?
Yes, sure. Read the compiler's error messages and find your IDE's button
that toggles that particular compiler switch which breaks your built.
Alternatively, find out how your IDE invokes the compiler: what exactly
are the switches? What's the difference to when you invoke it manually?
Richard B. Kreckel
More information about the GiNaC-devel