[489] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

pthreads and syslog

daemon@ATHENA.MIT.EDU (Stewart Gebbie)
Mon Nov 11 13:02:54 1996

Date: Mon, 11 Nov 1996 19:28:06 -0200 (GMT)
From: Stewart Gebbie <stewart@lin01.global.co.za>
To: pthreads@MIT.EDU

Hi,

I'm trying to use syslog with pthreads-1_60_beta5 without success.
to compile I used pg++ -o test_syslog test_syslog.cc

-----------------test_syslog.cc-------------------
#include <syslog.h>

int main(void)
{
   openlog("MyProg",LOG_PID,LOG_USER);
   
   syslog(LOG_USER|LOG_DEBUG,"[%lx,%s:%d] %d: %s",0,__FILE__,__LINE__,123,"
blaa");

   closelog();
   
   return 0;
};
--------------------------------------------------


and the output is

/tmp/cca007941.o: In function `main':
/tmp/cca007941.o(.text+0xd): undefined reference to `openlog(char *, int, i
nt)'
/tmp/cca007941.o(.text+0x2c): undefined reference to `syslog(int, char *,..
.)'
/tmp/cca007941.o(.text+0x34): undefined reference to `closelog(void)'

I can't seem to get around this.

Does anybody have any ideas.

Thanks in advance
stewart

/**************************************************************************
  Stewart Gebbie         
  (H)+27 11 4323196          ``Only the ignorant man becomes angry.
  (W)+27 11 6821895                 The wise man understands.''
  stewart@global.co.za
**************************************************************************/

home help back first fref pref prev next nref lref last post