Re: cpp Makefiles

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Lonnie Cumberland <lonnie_cumberland(at)yahoo(dot)com>
Cc: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: cpp Makefiles
Date: 2001-04-14 22:29:49
Message-ID: Pine.LNX.4.30.0104150020360.761-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-sql

Lonnie Cumberland writes:

> does someone have a simple Makefile that will allow me to compile up C++
> functions and either link in the libfile.a files or could please tell me how to
> make libfile.so out of them?

There is no simple Makefile to do that, that's the problem. If you need
help with your particular setup you should show in detail what you already
have and precisely what problem occurred. If you're using the makefiles
from the PostgreSQL tree, I suggest you update to 7.1 and look into
src/interfaces/libpq++ for an example. Also make sure your functions are
using C linkage (extern "C"), otherwise PostgreSQL won't find them. And
avoid static constructors. In general, C++ shared libraries are a complex
area that is hard to get right.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Lonnie Cumberland 2001-04-15 00:23:22 Re: cpp Makefiles
Previous Message Lonnie Cumberland 2001-04-14 18:00:30 cpp Makefiles

Browse pgsql-sql by date

  From Date Subject
Next Message Lonnie Cumberland 2001-04-15 00:23:22 Re: cpp Makefiles
Previous Message Josh Berkus 2001-04-14 22:12:03 Re: BOOLEAN data type?