"Luca Carrettin" <lucacarrettin@sogeasoft.com> writes:
> I get the following message:
> ERROR: Load of file .../libtest.so failed: undefined symbol: PG_GETARG_INT32
It looks like the compiler has taken PG_GETARG_INT32 for a function name
instead of a macro. This seems odd though, since you included fmgr.h
which is where the macro definition is. Perhaps the compiler is finding
some obsolete version of fmgr.h? The lack of any -I switches in your
cc invocation makes me wonder where it's finding fmgr.h ...
Personally I always include "-Wall" in cc invocations, since I don't
care for gcc's default willingness to accept unknown names as calls
to implicitly declared functions.
regards, tom lane