pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frédéric Boucher <ed@jetumele.com>
To: pgsql-interfaces@postgresql.org
Subject: FreeBSD -pthread -lpq problem...
Date: Mon, 19 Aug 2002 15:56:12 -0400
Message-ID: <00d101c247ba$7b050190$c2ce65cc@fred> (raw)

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

view thread (4+ messages)  latest in thread

Message-ID: <00d101c247ba$7b050190$c2ce65cc@fred>
Permalink:  ../00d101c247ba$7b050190$c2ce65cc@fred/
Also on:    postgresql.org/message-id/00d101c247ba$7b050190$c2ce65cc@fred

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: ed@jetumele.com
  Subject: Re: FreeBSD -pthread -lpq problem...
  In-Reply-To: <00d101c247ba$7b050190$c2ce65cc@fred>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox