I am currently trying to develop a C++ application which will envolve solving some algebraic tasks (such as differentiation or integration) using GiNaC; I've installed it first from the Ubuntu Software Center (Ubuntu 13.04) and afterwards directly from the ftp ftp://ftpthep.physik.uni-mainz.de/pub/GiNaC/ ; however, everytime i try to compile the following example program:
#include <iostream>
#include <ginac/ginac.h>
using namespace std;
using namespace GiNaC;
int main()
{
symbol x("x"), y("y");
ex poly;
for (int i=0; i<3; ++i)
poly += factorial(i+16)*pow(x,i)*pow(y,2-i);
cout << poly << endl;
return 0;
}
i get a list of errors, all starting with "undefined reference to GiNaC::". I have verified that cln is also installed and the header files are on the default locations. Also, when compiling I've used the command g++ -o simple pkg-config --cflags --libs ginac simple.cpp
and g++ -o simple -lginac -lcln simple.cpp
, both have failed to compile.