Hello Pedro,
that is more a matter of your compiler and your system than of
GiNaC.
Since you are on ubunte and ginac.h is already in
/usr/include/..., the program can be compiled with
g++ program.cpp -lginac
(-lginac tells the linker to load the library).
However, your program has an error, since poly is not defined. Add
ex poly;
above your for-loop, then it runs fine.
Kind regards,
Patrick
#include <iostream> #include <ginac/ginac.h> using namespace std; using namespace GiNaC; int main() { symbol x("x"), y("y"); for (int i=0; i<3; ++i) poly += factorial(i+16)*pow(x,i)*pow(y,2-i); cout << poly << endl; return 0; }
_______________________________________________ GiNaC-list mailing list GiNaC-list@ginac.de https://www.cebix.net/mailman/listinfo/ginac-list