From: Tom Lane <tgl@sss.pgh.pa.us>
To: TalGloz <glozmantal@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: PostgreSQL C Language Extension with C++ Code
Date: Sun, 12 Aug 2018 13:25:21 -0400
Message-ID: <27565.1534094721@sss.pgh.pa.us> (raw)
In-Reply-To: <1534093538827-0.post@n3.nabble.com>
References: <1534093538827-0.post@n3.nabble.com>
TalGloz <glozmantal@gmail.com> writes:
> I've searched information about my problem in the archives and on the
> internet, but it didn't help. I have this small myfunc.cpp
> [ that doesn't work ]
> 16: #ifdef PG_MODULE_MAGIC
> 17: PG_MODULE_MAGIC;
> 18: #endif
Hmm ... don't use an #ifdef there. If you don't have the macro defined,
you want to fail, not silently build an extension without it.
It's possible you need extern "C" { ... } around the macro, too.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, glozmantal@gmail.com
Subject: Re: PostgreSQL C Language Extension with C++ Code
In-Reply-To: <27565.1534094721@sss.pgh.pa.us>
References: <1534093538827-0.post@n3.nabble.com> <27565.1534094721@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox