Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2003 09:45:15 -0500 (EST)
From:      John Bleichert <syborg@stny.rr.com>
To:        Jonathan Chen <jonc@chen.org.nz>
Cc:        freebsd <freebsd-questions@FreeBSD.ORG>
Subject:   Re: PosgreSQL from ports
Message-ID:  <Pine.LNX.4.44.0302200940310.20706-100000@janeway.vonbek.dhs.org>
In-Reply-To: <20030220085957.GB80790@grimoire.chen.org.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 20 Feb 2003, Jonathan Chen wrote:
> On Wed, Feb 19, 2003 at 09:14:27PM -0800, Syborg wrote:
> > Greetings!
> > 
> > I have installed PostgreSQL 7.3.2 from the ports tree.
> > The server runs fine, I can create tables and issues
> > queries and whatnot. I can not, however, compile C
> > applications as the linker doesnt seem to find the C
> > libraries.
> 
> Show us the commands you're using to link with, as well as the error
> messages, and we can probably tell you what you're doing wrong.
> -- 

(This was originally from me - my mail box was down for a bit so I jumped 
on yahoo)

I'm trying to compile a very simple postgres app, from the samples, using 
this simple Makefile:

~~
CFLAGS=-Wall -I/usr/local/include -L/usr/local/lib

pgtest: pgtest.c
	gcc -o pgtest pgtest.c $(CFLAGS)
~~

I use this setup to test the rig on my Linux box too. I get lots of linker 
errors, the linker cannot find /usr/local/lib/libpq.so it looks like:

...
/tmp/ccNOWnok.o(.text+0x2b8): undefined reference to `PQntuples'
...

Normally when I install a dev environment from ports, I dont need to 
fiddle with ldconfig. Do I need to do that here? Or am I missing 
something?

Thanks - JB


#  John Bleichert 
#  http://vonbek.dhs.org/latest.jpg


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.44.0302200940310.20706-100000>