Re: error on mpz_inits and mpz_clears
On 9/24/19 6:01 AM, Rabindra Moirangthem wrote: Hi Team, I have installed the gmp library on a centos system What do you mean? Be specific. -- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: error on mpz_inits and mpz_clears
ni...@lysator.liu.se (Niels Möller) writes: Rabindra Moirangthem 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 ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: error on mpz_inits and mpz_clears
Rabindra Moirangthem 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. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
error on mpz_inits and mpz_clears
Hi Team, 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? With regards, Rabindra Moirangthem ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs