I installed the arblib library using vcpkg and trying to run a simple program from their website (https://arblib.org/setup.html):
#include "arb.h"
int main()
{
arb_t x;
arb_init(x);
arb_const_pi(x, 50 * 3.33);
arb_printn(x, 50, 0); flint_printf("\n");
flint_printf("Computed with arb-%s\n", arb_version);
arb_clear(x);
}
If I use VS 2022 (via creating an empty project with the program), everything works perfectly.
However, when trying to compile with gcc:
gcc test.c -o .\exe\test -LC:\...\vcpkg\installed\x64-windows\lib
-IC:\...\vcpkg\installed\x64-windows\include -larb -lflint -lmpfr -lgmp
the resulting executable doesn't work (command executed and failed (Exit Code 1)). Compilation goes without errors.
Using the elimination method, I realized that the problem is in the arb_printn
function. Probably I'm passing the wrong flags, but I can't figure how to fix the situation.