[GiNaC-list] Compilation

Vladimir V. Kisil kisilv at maths.leeds.ac.uk
Wed Mar 13 16:54:54 CET 2019


>>>>> On Wed, 13 Mar 2019 15:30:56 +0000 (UTC), Pedro Sosa via GiNaC-list <ginac-list at ginac.de> said:

    PS> Hello, I install in my Ubuntu Ginac but I don't know how to
    PS> compile a basic example #include <iostream> #include
    PS> <ginac/ginac.h> using namespace std; using namespace GiNaC;

    PS> int main() { symbol x("x"), y("y");

    PS>     for (int i=0; i<3; ++i) poly +=
    PS> factorial(i+16)*pow(x,i)*pow(y,2-i);

    PS>     cout << poly << endl; return 0; } where I must put this
    PS> file for ginac.h can be visiblethanks PS:
    PS> /usr/include/ginac/ginac.h

    You need to add the declaration:  

	ex poly;

   After that try to compile your code with the command:

g++ -lginac  test.cpp   -o test

  It works on my Debian system.
-- 
Vladimir V. Kisil                 http://www.maths.leeds.ac.uk/~kisilv/
  Book:     Geometry of Mobius Transformations     http://goo.gl/EaG2Vu
  Software: Geometry of cycles          http://moebinv.sourceforge.net/


More information about the GiNaC-list mailing list