Agreed, Dave! I fixed the header in MacPorts yesterday ( https://github.com/macports/macports-ports/commit/03e977add031301f57ca69729d829c607fe8d316 ) as well as submitted a bug report upstream ( https://sourceforge.net/p/log4cpp/support-requests/42/ ). I'm not 100% confident that my fix is the correct way to go, but it works with the flow of the code and removes the hopefully-unintended library link inheritance issue from the header (and, it works without rebuilding dependent projects, so that's a plus too). Let's hope they recognize the error of their ways & fix it property. Cheers! - MLD
On Tue, May 2, 2017, at 06:46 PM, Dave Horsfall wrote: > On Tue, 2 May 2017, Michael Dickens wrote: > > > The new CppUnit has an interesting issue: #include'ing the header, > > whether directly or indirectly, results in requiring linking to the > > library, because there is a new static variable in the primary namespace > > in the header. > > > > I think this is poor programming because, as an example, I might > > #include a header that in turn #include's the log4cpp header, but might > > project doesn't use or require log4cpp & this indirect inclusion forces > > it to do so. > > That is *terrible* programming practice, and says a lot about the > competence (or rather, the lack) of the programmer(s) involved. > > Header files are just that: headers; I don't care what their excuse is.
