Statically linking against libpq

From: Matthew Metnetsky <met(at)uberstats(dot)com>
To: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Statically linking against libpq
Date: 2005-01-17 19:10:20
Message-ID: 1105989020.10164.13.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'll start off by saying that I am a compiling novice, so bear with me
please.

I have a library which is being plugged into a game server to provide
extra functionality. The library is currently linked against libpq like
so `gcc -shared -lpq`. It compiles and runs great as long as people
have libpg installed. I'm trying to find a way to remove this
dependency so I googled around and found that `-shared` needed to be `-
static` and to add `-lcrypt` also. However, the linker is now failing
and tossing me lots of "undefined reference" messages to things like
"krb5_free_context" (I've attached the full log).

I'd appreciate any suggestions on getting a statically linked library
against libpq. I'm currently compiling on a Fedora Core 3 machine with
gcc-2.95.3 against the postgresql-libs-7.4.6-1.FC3.2 package.

Thanks in advace,

~ Matthew

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-01-17 19:33:15 Re: Index optimization ?
Previous Message Mage 2005-01-17 19:00:46 ext3