Statically linking against libpq - Mailing list pgsql-general

From Matthew Metnetsky
Subject Statically linking against libpq
Date
Msg-id 1105989020.10164.13.camel@localhost.localdomain
Whole thread Raw
Responses Re: Statically linking against libpq
Re: Statically linking against libpq
List 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


pgsql-general by date:

Previous
From: Mage
Date:
Subject: ext3
Next
From: Greg Stark
Date:
Subject: Re: Index optimization ?