Re: Problem running C function - Mailing list pgsql-novice

From Tom Lane
Subject Re: Problem running C function
Date
Msg-id 21930.1003949998@sss.pgh.pa.us
Whole thread Raw
In response to Problem running C function  ("Luca Carrettin" <lucacarrettin@sogeasoft.com>)
List pgsql-novice
"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

pgsql-novice by date:

Previous
From: Daniel Bautista
Date:
Subject: current and beta versions
Next
From: Ben Statham
Date:
Subject: Visual Database Design Tools