[494] in Pthreads mailing list archive
Re: pthreads and syslog
daemon@ATHENA.MIT.EDU (Neil Radisch)
Tue Nov 12 09:24:05 1996
From: Neil Radisch<nradisch@duck.com>
To: Stewart Gebbie <stewart@lin01.global.co.za>, pthreads@MIT.EDU
Date: Tue, 12 Nov 1996 07:28:13 -0500
I'm having the same problem
It compiles ok but does not write to the log.
Neil
> 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
> **************************************************************************/
> y>
------------
Neil Radisch
nradisch@duck.com