Re: [SQL] g++ not working for postgresql extension languages?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lonnie Cumberland <lonnie_cumberland(at)yahoo(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [SQL] g++ not working for postgresql extension languages?
Date: 2001-04-15 01:08:17
Message-ID: 24987.987296897@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-sql

Lonnie Cumberland <lonnie_cumberland(at)yahoo(dot)com> writes:
> so now I do not understand why the "gcc" version works and the "g++" version
> does not?

You need to say extern "C" to persuade a C++ compiler to compile a
function as something that can be called from plain C. They are not
the same language. See your C++ documentation for more info.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Lonnie Cumberland 2001-04-15 01:33:36 Re: g++ not working for postgresql extension languages?
Previous Message Giles Lean 2001-04-15 00:59:26 Re: DBD::Pg 0.96 and DBI 1.15 ignoring username and password

Browse pgsql-sql by date

  From Date Subject
Next Message Lonnie Cumberland 2001-04-15 01:33:36 Re: g++ not working for postgresql extension languages?
Previous Message Lonnie Cumberland 2001-04-15 00:53:26 Re: cpp Makefiles