Click here to Skip to main content

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy.
The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.


 
GeneralIf your name is Pral Pral or Kaleem PinprotectorChristian Graus15-Mar-14 20:01 
GeneralRe: If your name is Pral Pral or Kaleem PinprotectorOriginalGriff15-Mar-14 20:45 
General1000 years in the slammer ... we got a pill for that PinmemberBillWoodruff15-Mar-14 16:45 
GeneralRe: 1000 years in the slammer ... we got a pill for that PinprotectorOriginalGriff15-Mar-14 22:22 
GeneralRe: 1000 years in the slammer ... we got a pill for that PinmemberMike Hankey16-Mar-14 3:09 
GeneralRe: 1000 years in the slammer ... we got a pill for that Pinmember Forogar 16-Mar-14 3:38 
GeneralRe: 1000 years in the slammer ... we got a pill for that PinmemberMike Hankey16-Mar-14 6:25 
Generallog4cxx - The story continues PinprotectorMarco Bertschi15-Mar-14 13:32 
Regulars may remember my previous rant about log4cxx - I am still confident that it is a c@rap tool, and should be avoided due to Apache's poor maintenance.
 
Whatsoever, in the mean time I found out that it is in fact a purely VS-Compiler related problem.
Many many tutorials on teh internetz have suggested to avoid the compiler errors by moving certain macros out of certain classes - Which would've needed a lot of time which I currently don't have at my hands. After a looong google search, I came to a page[^] which suggested to only modify the defines in log4cxx.h a bit, and oh wonder - If you compile it with the "pointer and list definition macros for all other cases", it builds with no error. Weird, and I don't get what I did, so if anyone could care to explain I'd be happy to listen carefully.
Still, I don't accuse Microsoft for causing the error, from my POV it is Apache who did a poor job maintainig their source.
 
#if defined(_MSC_VER) && _MSC_VER < 1700 && !defined(LOG4CXX_STATIC) && defined(LOG4CXX)
#define LOG4CXX_PTR_DEF(T) \
template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<T>; \
typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr
#define LOG4CXX_LIST_DEF(N, T) \
template class LOG4CXX_EXPORT std::allocator<T>; \
template class LOG4CXX_EXPORT std::vector<T>; \
typedef std::vector<T> N
//
//   pointer and list definition macros when linking with DLL using VC
//
#elif defined(_MSC_VER) && _MSC_VER < 1700 && !defined(LOG4CXX_STATIC)
#define LOG4CXX_PTR_DEF(T) \
extern template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<T>; \
typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr
#define LOG4CXX_LIST_DEF(N, T) \
extern template class LOG4CXX_EXPORT std::allocator<T>; \
extern template class LOG4CXX_EXPORT std::vector<T>; \
typedef std::vector<T> N
//
//   pointer and list definition macros for all other cases
//
#else
#define LOG4CXX_PTR_DEF(T) typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr
#define LOG4CXX_LIST_DEF(N, T) typedef std::vector<T> N
#endif
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.

GeneralRe: log4cxx - The story continues PinadminChris Maunder15-Mar-14 14:41 
GeneralRe: log4cxx - The story continues PinprotectorMarco Bertschi15-Mar-14 15:11 
GeneralRe: log4cxx - The story continues PinmemberDan Neely17-Mar-14 3:07 
GeneralRe: log4cxx - The story continues PinprotectorMarco Bertschi17-Mar-14 3:17 
GeneralRe: log4cxx - The story continues PinprofessionalBrisingr Aerowing15-Mar-14 15:08 
GeneralRe: log4cxx - The story continues PinprotectorMarco Bertschi15-Mar-14 15:14 
GeneralRe: log4cxx - The story continues PinprofessionalBrisingr Aerowing15-Mar-14 16:04 
GeneralRe: log4cxx - The story continues PinmentorEspen Harlinn16-Mar-14 10:09 
GeneralRe: log4cxx - The story continues PinprotectorMarco Bertschi16-Mar-14 22:03 
GeneralRe: log4cxx - The story continues PinmentorEspen Harlinn17-Mar-14 4:01 
GeneralRe: log4cxx - The story continues PinprotectorMarco Bertschi17-Mar-14 6:22 
GeneralNo more exact member count PinprofessionalCarefulCoder15-Mar-14 13:00 
GeneralRe: No more exact member count PinadminChris Maunder15-Mar-14 13:29 
GeneralRe: No more exact member count PinmemberDalek Dave15-Mar-14 13:34 
GeneralRe: No more exact member count PinadminChris Maunder15-Mar-14 13:38 
GeneralRe: No more exact member count PinmemberDalek Dave15-Mar-14 13:49 
GeneralRe: No more exact member count PinprofessionalBrisingr Aerowing15-Mar-14 15:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.141015.1 | Last Updated 22 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid