Re: Can I use extern "C" in an extension so I can use C++? - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: Can I use extern "C" in an extension so I can use C++?
Date
Msg-id CAMsGm5fvhKjfGMqPuJE2w+yFLP0QARGMV7JqxqbcHjG1LEUMQg@mail.gmail.com
Whole thread Raw
In response to Re: Can I use extern "C" in an extension so I can use C++?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, 5 Jul 2020 at 18:49, Tom Lane <tgl@sss.pgh.pa.us> wrote:

My example wrapped the Postgres #include's, the PG_MODULE_MAGIC call,
and the PG_FUNCTION_INFO_V1 call(s) in extern "C" { ... }.  I'm pretty
sure you need to do all three of those things to get a working result
without mangled external function names.

I wrapped my entire file - #includes and all - in extern "C" { ... } and it worked perfectly. Thanks very much for your assistance and patience.

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: A patch for get origin from commit_ts.
Next
From: Michael Paquier
Date:
Subject: Re: TAP tests and symlinks on Windows