Click here to Skip to main content
12,816,336 members (30,832 online)

Welcome to the Lounge

   

For discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.

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, no programming questions and please don't post ads.
 
GeneralIf your name is Pral Pral or Kaleem Pin
Christian Graus15-Mar-14 21:01
protectorChristian Graus15-Mar-14 21:01 
GeneralRe: If your name is Pral Pral or Kaleem Pin
OriginalGriff15-Mar-14 21:45
protectorOriginalGriff15-Mar-14 21:45 
General1000 years in the slammer ... we got a pill for that Pin
BillWoodruff15-Mar-14 17:45
memberBillWoodruff15-Mar-14 17:45 
GeneralRe: 1000 years in the slammer ... we got a pill for that Pin
OriginalGriff15-Mar-14 23:22
protectorOriginalGriff15-Mar-14 23:22 
GeneralRe: 1000 years in the slammer ... we got a pill for that Pin
Mike Hankey16-Mar-14 4:09
memberMike Hankey16-Mar-14 4:09 
GeneralRe: 1000 years in the slammer ... we got a pill for that Pin
Forogar 16-Mar-14 4:38
member Forogar 16-Mar-14 4:38 
GeneralRe: 1000 years in the slammer ... we got a pill for that Pin
Mike Hankey16-Mar-14 7:25
memberMike Hankey16-Mar-14 7:25 
Generallog4cxx - The story continues Pin
Marco Bertschi15-Mar-14 14:32
protectorMarco Bertschi15-Mar-14 14: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 Pin
Chris Maunder15-Mar-14 15:41
adminChris Maunder15-Mar-14 15:41 
GeneralRe: log4cxx - The story continues Pin
Marco Bertschi15-Mar-14 16:11
protectorMarco Bertschi15-Mar-14 16:11 
GeneralRe: log4cxx - The story continues Pin
Dan Neely17-Mar-14 4:07
memberDan Neely17-Mar-14 4:07 
GeneralRe: log4cxx - The story continues Pin
Marco Bertschi17-Mar-14 4:17
protectorMarco Bertschi17-Mar-14 4:17 
GeneralRe: log4cxx - The story continues Pin
Brisingr Aerowing15-Mar-14 16:08
professionalBrisingr Aerowing15-Mar-14 16:08 
GeneralRe: log4cxx - The story continues Pin
Marco Bertschi15-Mar-14 16:14
protectorMarco Bertschi15-Mar-14 16:14 
GeneralRe: log4cxx - The story continues Pin
Brisingr Aerowing15-Mar-14 17:04
professionalBrisingr Aerowing15-Mar-14 17:04 
GeneralRe: log4cxx - The story continues Pin
Espen Harlinn16-Mar-14 11:09
mentorEspen Harlinn16-Mar-14 11:09 
GeneralRe: log4cxx - The story continues Pin
Marco Bertschi16-Mar-14 23:03
protectorMarco Bertschi16-Mar-14 23:03 
GeneralRe: log4cxx - The story continues Pin
Espen Harlinn17-Mar-14 5:01
mentorEspen Harlinn17-Mar-14 5:01 
GeneralRe: log4cxx - The story continues Pin
Marco Bertschi17-Mar-14 7:22
protectorMarco Bertschi17-Mar-14 7:22 
GeneralNo more exact member count Pin
CarefulCoder15-Mar-14 14:00
professionalCarefulCoder15-Mar-14 14:00 
GeneralRe: No more exact member count Pin
Chris Maunder15-Mar-14 14:29
adminChris Maunder15-Mar-14 14:29 
GeneralRe: No more exact member count Pin
Dalek Dave15-Mar-14 14:34
memberDalek Dave15-Mar-14 14:34 
GeneralRe: No more exact member count Pin
Chris Maunder15-Mar-14 14:38
adminChris Maunder15-Mar-14 14:38 
GeneralRe: No more exact member count Pin
Dalek Dave15-Mar-14 14:49
memberDalek Dave15-Mar-14 14:49 
GeneralRe: No more exact member count Pin
Brisingr Aerowing15-Mar-14 16:12
professionalBrisingr Aerowing15-Mar-14 16:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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
Web01 | 2.8.170308.1 | Last Updated 23 Mar 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid