A
Alfonso Morra
Hi,
I have some code from an example, that I want to retrofit into my
project. The code from the example has the following line:
SharedAppenderPtr myAppender( new RollingFileAppender("MyAppender"))
I want to move this line of code to a constructor in a wrapper class, so
that I can determine the appropriate Appender name during the object's
construction.
I have done the ff:
declared a privariate variable in my wrapper class as ff:
SharedAppenderPtr m_Appender ;
In my (wrapper class) constructor, I have the following code:
.....
m_Appender = new RollingFileAppender(log_file_name)
.....
However, I am getting linking errors (unresolved external symbol). I was
obviously wrong in thinking that I could use copy assignment in this
way. This is the actual liker error I'm getting (Although I am using MS
tools in this instance, I don't believe its a MS specific problem).
Auditor error LNK2019: unresolved external symbol "__declspec(dllimport)
public: class log4cplus::helpers::SharedObjectPtr<class
log4cplus::Appender> & __thiscall
log4cplus::helpers::SharedObjectPtr<class
log4cplus::Appender>:perator=(class log4cplus::Appender *)"
(__imp_??4?$SharedObjectPtr@VAppender@log4cplus@@@helpers@log4cplus@@QAEAAV012@PAVAppender@2@@Z)
referenced in function "public: __thiscall Auditor::Auditor(int,int)"
(??0Auditor@@QAE@HH@Z)
Any helpful suggestions (or better still, an actual solution to the
problem) will be greatly appreciated.
MTIA
I have some code from an example, that I want to retrofit into my
project. The code from the example has the following line:
SharedAppenderPtr myAppender( new RollingFileAppender("MyAppender"))
I want to move this line of code to a constructor in a wrapper class, so
that I can determine the appropriate Appender name during the object's
construction.
I have done the ff:
declared a privariate variable in my wrapper class as ff:
SharedAppenderPtr m_Appender ;
In my (wrapper class) constructor, I have the following code:
.....
m_Appender = new RollingFileAppender(log_file_name)
.....
However, I am getting linking errors (unresolved external symbol). I was
obviously wrong in thinking that I could use copy assignment in this
way. This is the actual liker error I'm getting (Although I am using MS
tools in this instance, I don't believe its a MS specific problem).
Auditor error LNK2019: unresolved external symbol "__declspec(dllimport)
public: class log4cplus::helpers::SharedObjectPtr<class
log4cplus::Appender> & __thiscall
log4cplus::helpers::SharedObjectPtr<class
log4cplus::Appender>:perator=(class log4cplus::Appender *)"
(__imp_??4?$SharedObjectPtr@VAppender@log4cplus@@@helpers@log4cplus@@QAEAAV012@PAVAppender@2@@Z)
referenced in function "public: __thiscall Auditor::Auditor(int,int)"
(??0Auditor@@QAE@HH@Z)
Any helpful suggestions (or better still, an actual solution to the
problem) will be greatly appreciated.
MTIA