Ramón Casero Cañas on Tue, 14 Jan 2003 10:44:56 +0100 (MET)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

how to include the u_FpM_inv() declaration


Hi all. I have installed the pari alpha version 2.2.4 in a GNU/Linux woody
kernel 2.4.18. First, the linker didn't find the -lpari, but I searched google
and found an older message about it, so changing -lpari to -lpari-2.2 in my
Makefile solved it.

But then, when I try to compile a code that uses the u_FpM_inv() function, I
get a

g++ -o lib/gamatrix.o -c -Wall   -ftemplate-depth-50 gamatrix.cpp
gamatrix.cpp: In function `bool inverse_mat_mod2(bool **, unsigned int,
bool)':
gamatrix.cpp:67: implicit declaration of function `int u_FpM_inv(...)'
make: *** [lib/gamatrix.o] Error 1

So I looked for the declaration in the src directory

rcasero@marcel:/usr/src/pari-2.2.4.alpha$ egrep -r u_FpM_inv *
Coincidencia en el fichero binario Olinux-i686/alglin1.o
Coincidencia en el fichero binario Olinux-i686/base3.o
Coincidencia en el fichero binario Olinux-i686/libpari-2.2.so.4.0.0
Coincidencia en el fichero binario Olinux-i686/libpari-2.2.so.4
Coincidencia en el fichero binario Olinux-i686/libpari-2.2.so
Coincidencia en el fichero binario Olinux-i686/gp-sta
src/basemath/alglin1.c:u_FpM_inv_sp(GEN a, ulong p) {
src/basemath/alglin1.c:u_FpM_inv(GEN a, ulong p) {
src/basemath/alglin1.c:  return u_FpM_inv_sp(dummycopy(a), p);
src/basemath/alglin1.c:    Hp = u_FpM_inv_sp(u_Fp_FpM(M,p), p);
src/basemath/base3.c:extern GEN u_FpM_inv(GEN a, ulong p);
src/basemath/base3.c:          mat = small_to_mat( u_FpM_inv(mat, 2) );

But if I add this include line in my code

#include "/usr/src/pari-2.2.4.alpha/src/basemath/base3.c"

then I get an

g++ -o lib/gamatrix.o -c -Wall   -ftemplate-depth-50 gamatrix.cpp
In file included from gamatrix.cpp:7:
/usr/src/pari-2.2.4.alpha/src/basemath/base3.c:21: pari.h: No such file or
directory
make: *** [lib/gamatrix.o] Error 1

as in base3.c the include for pari goes like

#include "pari.h"

Regards,

Ramón.

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!