Re: including header files in a C extension

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: TalGloz <glozmantal(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: including header files in a C extension
Date: 2018-08-20 07:03:17
Message-ID: 1534748597.2593.2.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

TalGloz wrote:
> If I have an external library that I install using make install into the
> /usr/local/include/libraryname path by default and I want to include it in a
> C extension, the Makefile for the .so file includes the headers in
> /usr/local/include/libraryname path.
>
> Can I use #include <libraryname/header.h> when writing C/CPP code for my
> PostgreSQL C extension or do I have to install the external library in a
> different path than /usr/local/include/libraryname. I think that the
> external library headers are not getting included.
>
> I do manage to build the .so file without error.....

If you can build the extension, what is your problem?

Usually you use the LDFLAGS to tell "make" where to find your headers.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message TalGloz 2018-08-20 07:11:56 Re: including header files in a C extension
Previous Message Nick Dro 2018-08-20 06:25:31 Allow Reg Expressions in Position function