Re: PostgreSQL C Language Extension with C++ Code

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL C Language Extension with C++ Code
Дата
Msg-id 27565.1534094721@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PostgreSQL C Language Extension with C++ Code  (TalGloz <glozmantal@gmail.com>)
Список pgsql-general
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


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

Предыдущее
От: TalGloz
Дата:
Сообщение: PostgreSQL C Language Extension with C++ Code
Следующее
От: Igor Korot
Дата:
Сообщение: Re: PostgreSQL C Language Extension with C++ Code