You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Munir Badir <mb...@mercury.com> on 2005/10/20 09:04:22 UTC

Link problems in log4cxx-0.9.8 (log4cxx::net::SMTPAppender)

Hi,

Yesterday I downloaded log4cxx-0.9.8 from
http://littletux.homelinux.org/log4cxx/
<http://littletux.homelinux.org/log4cxx/>   and I face the following link
problem:

 

       [cc]    Creating library log4cxxd.lib and object log4cxxd.exp

       [cc] class.obj : error LNK2001: unresolved external symbol "public:
static class log4cxx::hel

pers::Class const & __cdecl
log4cxx::net::SMTPAppender::getStaticClass(void)" (?getStaticClass@SMTPA

ppender@net@log4cxx@@SAABVClass@helpers@3@XZ)

       [cc] class.obj : error LNK2001: unresolved external symbol "public:
virtual __thiscall log4cx

x::net::SMTPAppender::~SMTPAppender(void)"
(??1SMTPAppender@net@log4cxx@@UAE@XZ)

       [cc] log4cxxd.dll : fatal error LNK1120: 2 unresolved externals

 

 

Please help.

 

Thanks,

Munir



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

MS Windows win32 build / more patches

Posted by Andreas Fester <An...@gmx.de>.
Hi,

http://littletux.homelinux.org/log4cxx/ now also contains MS Windows
binaries, compiled with the .NET C++ compiler. See Build_win32.html
for the build log file (there are still some minor issues) and
log4cxx-0.9.8_win32.zip for the binary package. The WIN32 build uses the ant
build approach. I plan to perform these builds regularly.

I recently added some more patches (see the patches subdirectory):

- The various apr1.2.2 diffs change the APR version to 1.2.2. This includes
  an updated patch file for Borland C++ / Mingw builds which is still not
  part of APR.

- 50-ifdef_smtp.diff fixes the unresolved symbols error which occured
  in the SMTP appender.

- 52-logstream_export.diff exports the << operators from stream.h which
  are used in the unit tests (and caused additional unresolved symbols).

Best Regards,

	Andreas

-- 
Andreas Fester
mailto:andreas@littletux.net
WWW: http://www.littletux.net
ICQ: 326674288

Re: Link problems in log4cxx-0.9.8 (log4cxx::net::SMTPAppender)

Posted by Andreas Fester <An...@gmx.de>.
Hi,

this is an issue I also observed, but did not fix yet.
In class.cpp line 36, please change

#ifdef LOG4CXX_HAVE_SMTP

to

#if LOG4CXX_HAVE_SMTP

Then it should work.

BTW: I am currently working on a daily MS-Windows build.
This issue is the last one which has to be fixed for it to work...

Best Regards,

	Andreas

Munir Badir wrote:
> Hi,
> 
> Yesterday I downloaded log4cxx-0.9.8 from
> http://littletux.homelinux.org/log4cxx/
> <http://littletux.homelinux.org/log4cxx/>   and I face the following link
> problem:
> 
>  
> 
>        [cc]    Creating library log4cxxd.lib and object log4cxxd.exp
> 
>        [cc] class.obj : error LNK2001: unresolved external symbol "public:
> static class log4cxx::hel
> 
> pers::Class const & __cdecl
> log4cxx::net::SMTPAppender::getStaticClass(void)" (?getStaticClass@SMTPA
> 
> ppender@net@log4cxx@@SAABVClass@helpers@3@XZ)
> 
>        [cc] class.obj : error LNK2001: unresolved external symbol "public:
> virtual __thiscall log4cx
> 
> x::net::SMTPAppender::~SMTPAppender(void)"
> (??1SMTPAppender@net@log4cxx@@UAE@XZ)
> 
>        [cc] log4cxxd.dll : fatal error LNK1120: 2 unresolved externals

-- 
Andreas Fester
mailto:andreas@littletux.net
WWW: http://www.littletux.net
ICQ: 326674288