Re: cpp Makefiles - Mailing list pgsql-interfaces

From Peter Eisentraut
Subject Re: cpp Makefiles
Date
Msg-id Pine.LNX.4.30.0104150020360.761-100000@peter.localdomain
Whole thread Raw
In response to cpp Makefiles  (Lonnie Cumberland <lonnie_cumberland@yahoo.com>)
Responses Re: cpp Makefiles
g++ not working for postgresql extension languages?
Re: cpp Makefiles
List pgsql-interfaces
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@gmx.net   http://funkturm.homeip.net/~peter



pgsql-interfaces by date:

Previous
From: Lonnie Cumberland
Date:
Subject: cpp Makefiles
Next
From: Lonnie Cumberland
Date:
Subject: Re: cpp Makefiles