Skip to content
Advertisement

Tag: header-files

Global variables in header only library

I’m writing a header-only logger library and I need global variables to store current logger settings (output flags, log file descriptor etc.). My thoughts: I can’t declare variables as extern, as i don’t have access to the translation units to define them I can’t just define global variables in header as it will lead to multiple definitions static variables in

rlim_t errors with login_cap.h in Debian

I’m trying to compile the bsdmainutils package in Debian that uses the /usr/include/login_cap.h header (from libutil-freebsd-dev), and I’m getting a bunch of errors like this: I’m using Debian testing. Is this a bug in login_cap.h? I see rlim_t defined in /usr/include/x86_64-linux-gnu/bits/resource.h – can I just include that file within login_cap.h? If so, do I have to include the arch-dependent path

Advertisement