Re: Can I use extern "C" in an extension so I can use C++?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Can I use extern "C" in an extension so I can use C++?
Дата
Msg-id 1315608.1593989396@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Can I use extern "C" in an extension so I can use C++?  (Isaac Morland <isaac.morland@gmail.com>)
Ответы Re: Can I use extern "C" in an extension so I can use C++?  (Isaac Morland <isaac.morland@gmail.com>)
Список pgsql-hackers
Isaac Morland <isaac.morland@gmail.com> writes:
> On Sun, 5 Jul 2020 at 18:07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Something like the attached works for me; what problem are you having
>> *exactly*?

> I've attached a .cpp file.

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.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Isaac Morland
Дата:
Сообщение: Re: Can I use extern "C" in an extension so I can use C++?
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk (hash_mem)