Subject: large object compiling error

From: Elaine Chang <[email-masked]>
Date: Tue, 23 Feb 93 16:25:13 -0800

Hi:

	I was trying to compile the example large object program on p. 113
of the Postgres Reference Manual.  I ran into this compiling error:

cc -I$POSTGRESHOME/src/lib/H -I$POSTGRESHOME/src/port/$PORTNAME -o
LOwrite.exe LOwrite.c libpq.a
ld: Undefined symbol 
   _setenv 
Compilation failed

These are the include files in my program (LOwrite.c).

#include <stdio.h>
#include <tmp/libpq.h>
#include <tmp/c.h>
#include <tmp/postgres.h>
#include <tmp/libpq-fe.h>
#include <tmp/libpq-fs.h>
#include <catalog/pg_lobj.h>

If you have seen this error before or have a possible solution, please let
me know.  Any help will be greatly appreciated.

Thanks!

Elaine Chang

---

From: <[email-masked]>
Date: Tue, 23 Feb 93 16:39:30 PST

> LOwrite.exe LOwrite.c libpq.a

libpq contains an (erroneous) call to setenv(), which should be putenv().
you can rat around in the libpq source files and find this, or you can
sit tight for a day or two and get the 4.1 release of postgres, which has
this bug (among others) fixed.
					mike