I've been using Nemo for multivariate rational functions, but I'm exploring moving back to C/C++. I just tried the latest github version of FLINT, which has the needed header fmpz_mpoly_q.h, previously part of Calcium. I was able write simple C programs with this. However, I'm not able to compile it under C++, even if I write
extern "C" {
#include "fmpz_mpoly_q.h"
}
This immediately triggers the g++ compiler to complain "error: template with C linkage". More lines of the error message is shown below. Is there a quick solution, or should I wait for the official FLINT 3 release?
In file included from /usr/include/c++/11/bits/stringfwd.h:40,
from /usr/include/c++/11/iosfwd:39,
from /usr/include/x86_64-linux-gnu/gmp.h:34,
from /home/username/flint2/local/include/flint/flint.h:28,
from /home/username/flint2/local/include/flint/fmpz_types.h:15,
from /home/username/flint2/local/include/flint/fmpz.h:21,
from /home/username/flint2/local/include/flint/fmpq.h:22,
from /home/username/flint2/local/include/flint/fmpz_mpoly_q.h:25,
from try.cpp:3:
/usr/include/c++/11/bits/memoryfwd.h:63:3: error: template with C linkage