Re: Problem running C function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Luca Carrettin" <lucacarrettin(at)sogeasoft(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Problem running C function
Date: 2001-10-24 18:59:58
Message-ID: 21930.1003949998@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Luca Carrettin" <lucacarrettin(at)sogeasoft(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Mark McArthey 2001-10-25 02:31:19 undefined reference to `ECPGconnect'
Previous Message Luca Carrettin 2001-10-24 16:30:34 Problem running C function