Skip site navigation (1) Skip section navigation (2)

FreeBSD -pthread -lpq problem...

From: Frédéric Boucher <ed(at)jetumele(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: FreeBSD -pthread -lpq problem...
Date: 2002-08-19 19:56:12
Message-ID: 00d101c247ba$7b050190$c2ce65cc@fred (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hi,
 
I'm trying to compile a very simply program on FreeBSD that uses the C
libpq interface...  when I do like this :
 
g++ -o test test.cpp -lpq
 
it works perfectly.  But since I've made a Multi-thread version of this
program, I must now include the -pthread library.  As soon as I try to
compile using this :
 
g++ -o test test.cpp  -lpq -pthread
 
I receive errors : 
 
/usr/lib/libc.so.4: WARNING!  setkey(3) not present in the system!
/usr/lib/libc.so.4: warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so.4: warning: mktemp() possibly used unsafely; consider
using mkstemp()
/usr/lib/libc.so.4: WARNING!  des_setkey(3) not present in the system!
/usr/lib/libc.so.4: WARNING!  encrypt(3) not present in the system!
/usr/lib/libc.so.4: warning: tmpnam() possibly used unsafely; consider
using mkstemp()
/usr/lib/libc.so.4: warning: this program uses f_prealloc(), which is
stupid.
/usr/lib/libc.so.4: WARNING!  des_cipher(3) not present in the system!
/usr/lib/libc.so.4: warning: tempnam() possibly used unsafely; consider
using mkstemp()

The errors occurs only when I mix "-lpq" with "-pthread"...  if I use
either one or the other, it works...  Well I need to have
multi-threading capability and POSTGRES access at the same time... :(
Is this possible?  How?
 
thanks for your hint
 
Fred

Responses

pgsql-interfaces by date

Next:From: Stephen LeeDate: 2002-08-21 04:01:01
Subject: libpq (Postgres 7.2.1) + MacOS X 10.1.5 problem
Previous:From: Björn LundinDate: 2002-08-19 08:54:58
Subject: Re: determining if there's a transaction in progress

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group