Re: A "linking" Question - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: A "linking" Question
Date
Msg-id 20040603135022.GI29499@svana.org
Whole thread Raw
In response to A "linking" Question  (Terry Lee Tucker <terry@esc1.com>)
Responses Re: A "linking" Question  (Terry Lee Tucker <terry@esc1.com>)
List pgsql-general
On Thu, Jun 03, 2004 at 09:08:40AM -0400, Terry Lee Tucker wrote:
> Let me explain:
>
> I have written a "C" function which contains calls to other functions, all of
> which work with an API to a mileage database product called PCMiler. These
> functions make connections to the PCMiler databae, do error checking on the
> origin and destination, get directions, etc. There is only one function
> loaded into postgres and it makes calls to everything else. I create a shared
> object library containing one object file: pcmiler.o and also containing a
> link to the PCMiler SO, libpcmsrv.so. Here is the make file code:

<snip>

> All the complaints are regarding pgsql server functions. Obviously, I need to
> link with some sort of library, but I don't know which one. I'm already
> linking with libpq and I tried libepcg but that didn't work. I'm not very
> knowledgeable regarding some of these things so please excuse my ingorance.
> Can somebody give me a clue as to the error of my ways?

There is no library with those functions. They exist within the server
binary itself and are exported to dynamically linked modules that are
loaded in.

I think you need to split your library in two, one part which depends
on being loaded into postgresql and the part that can be used standalone.

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Terry Lee Tucker
Date:
Subject: A "linking" Question
Next
From: Manfred Koizar
Date:
Subject: Re: Creating a session variable in Postgres