Re: Linking PostgreSQL as a C++ program

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Linking PostgreSQL as a C++ program
Date: 2018-01-29 05:02:57
Message-ID: 20180129050257.GC8173@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 29, 2018 at 05:46:54PM +1300, Craig Ringer wrote:
> extern "C" {
> #include "postgres.h"
> }

Don't you need __cplusplus as well? More or less that:

#ifdef __cplusplus
extern "C" {
#endif
#include "postgres.h"
#ifdef __cplusplus
}
#endif
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2018-01-29 05:03:02 Re: Temporary tables prevent autovacuum, leading to XID wraparound
Previous Message Thomas Munro 2018-01-29 04:59:13 Re: Failed test 'psql query died successfully after SIGQUIT'