error on mpz_inits and mpz_clears
Rabindra Moirangthem
m.rabin07 at gmail.com
Wed Sep 25 04:49:50 UTC 2019
Hello,
I got the error while compiling and I compiled using the command:
gcc programname.c -lgmp
The version of the gmp I am using is gmp-6.1.2
On Tue, Sep 24, 2019 at 5:59 PM Torbjörn Granlund <tg at gmplib.org> wrote:
> nisse at lysator.liu.se (Niels Möller) writes:
>
> Rabindra Moirangthem <m.rabin07 at gmail.com> writes:
> >
> > I have installed the gmp library on a centos system. When I compiled
> my c
> > file, it gives errors only when I am using mpz_inits and mpz_clears in
> my
> > program. Other functions compiled successfully.
> > The errors given are:
> > undefined reference to `__gmpz_inits'
> > undefined reference to `__gmpz_clears'
> >
> > What seems to be the problem here?
>
> Most likely, you are linking with a too old version of the gmp library.
> Do you get this error at compile/link time, or at runtime/loadtime? In
> the latter case, try running ldd on your executable, and will tell you
> which libraries it loads.
>
> Note that Rabindra didn't even let us know which version of GMP they
> compiled, which command they used for the failing compile, or any other
> needed information.
>
> --
> Torbjörn
> Please encrypt, key id 0xC8601622
>
More information about the gmp-bugs
mailing list