Thread: static compilation error

static compilation error

From
Ice Planet
Date:
Hi,

I would like to compile my simple test program, but I need to use static
compilation.

I'm using postgres 7.0.2 on debian 2.2 .

Enviroment settings:
LD_LIBRARY_PATH=/usr/local/pgsql/lib

The whole install was done following readme in sources downloaded from
www.postgresql.org

I compile this attached source using:

gcc admin.c -static -L/usr/local/pgsql/lib -lpq -lcrypt -Wall -o admin

And I get error message like this:

/usr/local/pgsql/lib/libpq.a(fe-connect.o): In function `defaultNoticeProcessor':
fe-connect.o(.text+0x21ad): undefined reference to `_IO_stderr_'
collect2: ld returned 1 exit status

Thanks for any help

                      Ice Planet

Attachment