Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot find syslog.h on windows

I am rewriting a c program which was used to linux, now I'll reused it on windows, I write a bat file. I run this file as administrator, then error occurs: syslog.h:No such file or directory.

Could you please give me some advices? thx.

like image 792
diligent Avatar asked Feb 29 '12 08:02

diligent


1 Answers

Probably the program you are porting to windows uses the syslog(3) function call (in addition to openlog and closelog). These are defined in syslog.h on unix. Windows does not have these, so you can do the following:

  • Remove syslog.h and these function calls from the code.
  • Create a syslog.h and implement these calls or just define them as empty macros.
  • Use cygwin which provides POSIX compatibility.
like image 97
b0ti Avatar answered Sep 27 '22 17:09

b0ti