Re: Linking PostgreSQL as a C++ program - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Linking PostgreSQL as a C++ program
Date
Msg-id 20180129050257.GC8173@paquier.xyz
Whole thread Raw
In response to Linking PostgreSQL as a C++ program  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: Linking PostgreSQL as a C++ program
List 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

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Failed test 'psql query died successfully after SIGQUIT'
Next
From: Masahiko Sawada
Date:
Subject: Re: Temporary tables prevent autovacuum, leading to XID wraparound