logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lennart Goedhart" <lenn...@omnibase.com.au>
Subject Re: Problem compiling log4cxx-0.9.7 examples in VC6
Date Tue, 11 May 2004 11:47:15 GMT
STLport produces a DLL and a static library.
The STLport documentation says:
"However, if your project deploys any Win DLL's using STLport, you have to
use STLport as Win DLL, too."
So I assume that means I should use the log4cxx.lib and log4cxx.dll
If I change the trival.dsp to a "Debug Multithreaded DLL", change
log4cxxs.lib to log4cxx.lib, and remove the LOG4CXX_STATIC preprocessor
definition, I get similar errors (I'll only show 1 here for bevity):
-----------------------
trivial.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: void __thiscall log4cxx::Logger::fatal(class
_STL::basic_string<char,class _STL::char_traits<char>,class
_STL::allocator<char> > const &,char const *,int)" (__imp
_?fatal@Logger@log4cxx@@QAEXABV?$basic_string@DV?$char_traits@D@_STL@@V?$all
ocator@D@2@@_STL@@PBDH@Z)
-----------------------

Lennart

----- Original Message ----- 
From: "Michael CATANZARITI" <mcatan@free.fr>
To: "Log4CXX User" <log4cxx-user@logging.apache.org>
Sent: Tuesday, May 11, 2004 7:38 PM
Subject: Re: Problem compiling log4cxx-0.9.7 examples in VC6


> Hello Lennart,
>
> I have not tested log4cxx 0.9.7 with STLPort.
> May be the problem is due to the runtime C library.
> in static.dsp and trivial.dsp, the runtime library is used as "Debug
> multithread" (static library).
> Is is the case in STLPort ?
>
> Michaƫl
>
> Selon Lennart Goedhart <lennart@omnibase.com.au>:
>
> > log4cxx 0.9.7 compiles perfectly on both my Windows and Mandrake boxes.
> > But when I compile the examples in VC6, I get the following errors:
> > -------------------------------------------------------------
> > Linking...
> >    Creating library ../Bin/Static Debug/trivial.lib and object
../Bin/Static
> > Debug/trivial.exp
> > LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other
> > libs; use /NODEFAULTLIB:library
> > trivial.obj : error LNK2001: unresolved external symbol "public: void
> > __thiscall log4cxx::Logger::fatal(class _STL::basic_string<char,class
> > _STL::char_traits<char>,class _STL::allocator<char> > const &,char
const
> > *,int)" (?fatal@Logger@log4cxx@@QAEX
> >
ABV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PBDH@Z)
> > trivial.obj : error LNK2001: unresolved external symbol "public: void
> > __thiscall log4cxx::Logger::error(class _STL::basic_string<char,class
> > _STL::char_traits<char>,class _STL::allocator<char> > const &,char
const
> > *,int)" (?error@Logger@log4cxx@@QAEX
> >
ABV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PBDH@Z)
> > trivial.obj : error LNK2001: unresolved external symbol "public: void
> > __thiscall log4cxx::Logger::warn(class _STL::basic_string<char,class
> > _STL::char_traits<char>,class _STL::allocator<char> > const &,char
const
> > *,int)" (?warn@Logger@log4cxx@@QAEXAB
> > V?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PBDH@Z)
> > trivial.obj : error LNK2001: unresolved external symbol "public: void
> > __thiscall log4cxx::Logger::info(class _STL::basic_string<char,class
> > _STL::char_traits<char>,class _STL::allocator<char> > const &,char
const
> > *,int)" (?info@Logger@log4cxx@@QAEXAB
> > V?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PBDH@Z)
> > trivial.obj : error LNK2001: unresolved external symbol "public: void
> > __thiscall log4cxx::Logger::debug(class _STL::basic_string<char,class
> > _STL::char_traits<char>,class _STL::allocator<char> > const &,char
const
> > *,int)" (?debug@Logger@log4cxx@@QAEX
> >
ABV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PBDH@Z)
> > trivial.obj : error LNK2001: unresolved external symbol "public: static
void
> > __cdecl log4cxx::NDC::push(class _STL::basic_string<char,class
> > _STL::char_traits<char>,class _STL::allocator<char> > const &)"
> > (?push@NDC@log4cxx@@SAXABV?$basic_string@DV?$
> > char_traits@D@_STL@@V?$allocator@D@2@@_STL@@@Z)
> > ../Bin/Static Debug/trivial.exe : fatal error LNK1120: 6 unresolved
> > externals
> > Error executing link.exe.
> >
> > trivial.exe - 7 error(s), 1 warning(s)
> > -------------------------------------------------------------
> > I've also added /NODEFAULTLIB:LIBCMT to the project settings, the only
> > difference being I don't get the warning.
> > I've also downloaded the latest source from CVS with the same result.
> > Examples work fine for Mandrake with the same source.
> >
> > Kind Regards,
> >
> > Lennart
> > ----
> > Althon 1.4
> > Windows 2000 SP4
> > MSVC6 SP6
> > STLport 4.6.2 (with  _STLP_NO_OWN_IOSTREAMS defined: ie. running
STLport's
> > iostreams)
> >
> >
>
>


Mime
View raw message