Re: Srf function : missing library on PostgreSQL 8.3.6 on Windows? - Mailing list pgsql-general

From Ben Ali Rachid
Subject Re: Srf function : missing library on PostgreSQL 8.3.6 on Windows?
Date
Msg-id 395843.14011.qm@web28512.mail.ukl.yahoo.com
Whole thread Raw
In response to Srf function : missing library on PostgreSQL 8.3.6 on Windows?  (Ben Ali Rachid <souliman239@yahoo.fr>)
Responses Re: Srf function : missing library on PostgreSQL 8.3.6 on Windows?  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general

Thanks for your help. I try "extern C" for the inclusions and everything is OK. But now I have execution error (server crash), but it's another problem that I will try to solve.

--- En date de : Ven 20.3.09, Tom Lane <tgl@sss.pgh.pa.us> a écrit :

De: Tom Lane <tgl@sss.pgh.pa.us>
Objet: Re: [GENERAL] Srf function : missing library on PostgreSQL 8.3.6 on Windows?
À: "Ben Ali Rachid" <souliman239@yahoo..fr>
Cc: pgsql-general@postgresql.org
Date: Vendredi 20 Mars 2009, 16h37

Ben Ali Rachid <souliman239@yahoo.fr> writes:
> I have this link error : "undefined reference to 'init_MultiFuncCall(FunctionCallInfoData*)'".

The fact that the linker knows the argument data type indicates that
you're trying to compile your code as C++.  Postgres is written in C,
not C++.

You can try putting extern "C" { ... } around your inclusions of
Postgres header files, but you're likely to run into other problems
later on.  On the whole I'd recommend using plain C for backend
functions if you possibly can.

            regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Fulltext - multiple single column indexes
Next
From: "Will Rutherdale (rutherw)"
Date:
Subject: Re: Is there a meaningful benchmark?