I'm getting the following error when compiling under Mac OS X:
g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -g -O2 -Wall -Wno-unused -pedantic -c PatternLayout.cpp -MT PatternLayout.lo -MD -MP -MF .deps/PatternLayout.TPlo -fno-common -DPIC -o .libs/PatternLayout.lo
PatternLayout.cpp:128: error: invalid in-class initialization of static data
member of non-integral type `const char* const'
PatternLayout.cpp:129: error: invalid in-class initialization of static data
member of non-integral type `const char* const'
PatternLayout.cpp:130: error: invalid in-class initialization of static data
member of non-integral type `const char* const'
PatternLayout.cpp: In constructor `
log4cpp::TimeStampComponent::TimeStampComponent(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
PatternLayout.cpp:134: error: `FORMAT_ISO8601' undeclared (first use this
function)
PatternLayout.cpp:134: error: (Each undeclared identifier is reported only once for each function it appears in.)
PatternLayout.cpp:136: error: `FORMAT_ABSOLUTE' undeclared (first use this
function)
PatternLayout.cpp:138: error: `FORMAT_DATE' undeclared (first use this
function)
make[1]: *** [PatternLayout.lo] Error 1
make: *** [all-recursive] Error 1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm getting the following error when compiling under Mac OS X:
g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -g -O2 -Wall -Wno-unused -pedantic -c PatternLayout.cpp -MT PatternLayout.lo -MD -MP -MF .deps/PatternLayout.TPlo -fno-common -DPIC -o .libs/PatternLayout.lo
PatternLayout.cpp:128: error: invalid in-class initialization of static data
member of non-integral type `const char* const'
PatternLayout.cpp:129: error: invalid in-class initialization of static data
member of non-integral type `const char* const'
PatternLayout.cpp:130: error: invalid in-class initialization of static data
member of non-integral type `const char* const'
PatternLayout.cpp: In constructor `
log4cpp::TimeStampComponent::TimeStampComponent(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
PatternLayout.cpp:134: error: `FORMAT_ISO8601' undeclared (first use this
function)
PatternLayout.cpp:134: error: (Each undeclared identifier is reported only once for each function it appears in.)
PatternLayout.cpp:136: error: `FORMAT_ABSOLUTE' undeclared (first use this
function)
PatternLayout.cpp:138: error: `FORMAT_DATE' undeclared (first use this
function)
make[1]: *** [PatternLayout.lo] Error 1
make: *** [all-recursive] Error 1
I forgot to mention that I'm using log4cpp 0.3.3.