You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file included from /usr/include/c++/14/bits/stringfwd.h:40,
from /usr/include/c++/14/iosfwd:41,
from /usr/include/x86_64-linux-gnu/gmp.h:35,
from /usr/include/flint/flint.h:28,
from /usr/include/flint/fmpz_types.h:15,
from /usr/include/flint/qqbar.h:25,
from main.cc:3:
/usr/include/c++/14/bits/memoryfwd.h:64:3: error: template with C linkage
64 | template<typename>
| ^~~~~~~~
/usr/include/flint/qqbar.h:22:1: note: ‘extern "C"’ linkage started here
22 | extern "C" {
| ^~~~~~~~~~
The issue is that gmp.h will include C++-only headers if __cplusplus is defined, which will break the compilation since they are inside the extern "C" block. The easy fix is to switch the order to:
In
qqbar.h
theextern "C"
block is opened before including further headers, like this:This causes a compilation error for me:
The issue is that
gmp.h
will includeC++
-only headers if__cplusplus
is defined, which will break the compilation since they are inside theextern "C"
block. The easy fix is to switch the order to:The same issue occurs in
fexpr.h
,fexpr_builtin.h
andfmpz_mpoly_q.h
. If you want, I can create a PR for this.(As a workaround, if you also encouter this, simply include
flint.h
beforeqqbar.h
)The text was updated successfully, but these errors were encountered: