Here is a brief description of the main options of gp2c, which can be seen with ./gp2c -h.
In Section 2.1 we saw how to use the -g option.
radical(x)=F=factor(x)[,1];prod(i=1,length(F),F[i])
The variable 'F' is undeclared in this routine, so when running gp2c with the -W option it prints
Warning:algorithm.gp:1:variable undeclared F
At present, an undeclared variable is taken to be a "formal variable" for
polynomials by gp2c, so do not declare it if that is what you intend.
For example in pol(a,b,c)=a*x^2+b*x+c
you must not declare 'x' since it
stands for the formal variable 'x.
Try this option each time the compiler fails to compile gp2c output to see if there is a name conflict. If this is the case, change the name in your GP script. It may be difficult to find conflicting names if your compiler is not verbose enough and if you are not familiar with the PARI code and C in general.
Example of conflicting names are top,bot,prec,un, but there are thousands of others and they may be system-dependent.
test(data,flag=0)={CODE}This does not affect the C code, only the install commands.
Reasons why a GP function may not be known by the compiler are:
Normally no functions are added between two stable releases of GP with the same minor version number (say 2.1.1 and 2.1.2) so there is no need to recompile gp2c when you upgrade. But if you use the developement versions, you need to recompile. Also some new developement versions may break old versions of gp2c, so upgrade gp2c at the same time.
However, if you want to compile scripts which do not use the new functions, you do not need to recompile. Note that you may use the GP environnement variables to tell gp2c-run which GP to use.