Emma Anderson
Emma Anderson

Reputation: 21

flint/arb.h: No such file or directory

I'm trying to compile this simple FLINT program:

#include "flint/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 FLINT-%s\n", flint_version);
    arb_clear(x);
}

Following https://www.flintlib.org/doc/building.html, I installed it via MSYS. Apparently there are with detecting arb.h, when I try to run the program, I get the following errors:

flint.c:1:10: fatal error: flint/arb.h: No such file or directory

The following command is used to run the program:

gcc flint.c -lflint -lgmp -lmpfr

I tried different combinations of this command, according to link, I can provide flags such as: -I/path/to/flint -L/path/to/flint, if the FLINT header and library files are not in a standard location such as /usr/local, in my case path to arb.h is "C:\msys64\usr\local\include". If i do it, file is visible, but there are many errors like C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/. ./../../../x86_64-w64-mingw32/bin/ld.exe: C:\...\ccv8aaRi.o:flint.c:(.text+ 0xd5): undefined reference to arb_fprintn', even though the functions like "arb_fprintn" are defined in arb.h.

UPD

It turns out that I had the arb.h file from another library,and there is no flie arb.h in flint itself for some reason. I'm wondering if anyone else has had this problem and what should be done? The code I'm trying to compile is listed as an example on the (https://www.flintlib.org/doc/building.html)

Upvotes: 2

Views: 204

Answers (0)

Related Questions