How to debug GMP in Mint?
Torbjörn Granlund
tg at gmplib.org
Sun Nov 10 20:14:28 UTC 2019
Andy <borucki.andrzej at gmail.com> writes:
First, I try to install:
sudo apt-get install libgmp-dev
already installed :libgmp-dev is already the newest version
(2:6.1.2+dfsg-2).
(what means "2:" ?)
You need to ask the maintainer of your OS.
I create cmake application and go with CLion.
in CMakeLists.txt is:
add_executable(gmptest main.cpp)
target_link_libraries(gmptest
gmp)
I have test function:
int testdiv()
{
mp_limb_t resDigits[1];
mp_limb_t remDigits[1];
mp_limb_t xDigits[1];
mp_limb_t yDigits[1];
xDigits[0] = 100;
yDigits[0] = 7;
mpn_tdiv_qr(resDigits, remDigits, 0,
xDigits, 1, yDigits, 1);
cout << "result=" << resDigits[0] <<endl;
}
I debug program but I can't go inside mpn_tdiv_qr
This is a general programming/debugging question. It is therefore not
something which is suitable for any GMP list.
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-discuss
mailing list