Static link with libpq

From: Matthew Hagerty <matthew(at)wolfepub(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Static link with libpq
Date: 1998-07-21 20:16:30
Message-ID: 3.0.3.32.19980721161630.00697780@wolfepub.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Greetings,

Is it possible to compile a C program that uses libpg as a static program?
I tried the obvious:

# gcc -I../pgsql/include -L../pgsql/lib -static -o test test.c -lpq

This is my error:

ld: No reference to __DYNAMIC

I'm using gcc-2.7.2.1 on FreeBSD-2.2.6-Release and PG-6.3.2

Any insight would be greatly appreciated. Also, please to cc me, as I am
not yet on the list.

Thanks,
Matthew

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter T Mount 1998-07-21 20:28:23 Re: [INTERFACES] JDBC JAVA interface
Previous Message Brett McCormick 1998-07-21 20:10:22 Re: [INTERFACES] jdbc notification