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 Per Frykenvall <pf...@got.wmdata.se> on 2005/10/26 09:41:44 UTC
Compile error patternlayout.cpp with visualc++
Hi,
I checked out HEAD from log4cxx subversion repository yesterday, and
tried to build it with the command line compiler of Visual Studio .NET
2003. I got several compilation errors emanating from lines like the
following of patterlayout.cpp, fixedwindowrollingpolicy.cpp and
timebasedrollingpolicy.cpp:
RULES_PUT("c", LoggerPatternConverter);
FYI, I had to build with "ant -Dapr.version=1.2.2
-Daprutil.version=1.2.2" because the 1.1 versions are not on
apache.mirrors.pair.com anymore. That also forced me to do something
about the apr-1.1.0.patch which is used in the build file; I simply
deleted the patch task.
If I remove all RULES_PUT lines from the 3 cpp files, the build of the
DLL is successful (except for a warning in msxml.cpp line 289), and the
build continues up to patternparsertestcase.cpp which has more RULES_PUT.
Each compilation error for RULES_PUT goes like this (I've indented it
myself):
[cc] D:\appl\logging-log4cxx\src\patternlayout.cpp(133) : error C2665:
'std::pair<
class std::basic_string<
unsigned short,
struct std::char_traits<unsigned short>,
class std::allocator<unsigned short>
> const ,
class log4cxx::helpers::ObjectPtrT<
class log4cxx::pattern::PatternConverter
> (__cdecl*)(
class std::vector<
class std::basic_string<
unsigned short,
struct std::char_traits<unsigned short>,
class std::allocator<unsigned short>
>,
class std::allocator<
class std::basic_string<
unsigned short,
struct std::char_traits<unsigned short>,
class std::allocator<unsigned short>
>
>
> const &
)>::__ctor' :
none of the 3 overloads can convert parameter 2 from type
'log4cxx::pattern::PatternConverterPtr (const
std::vector<_Ty,_Ax> &)'
with
[
_Ty=log4cxx::LogString,
_Ax=std::allocator<log4cxx::LogString>
]
could be 'std::pair<_Ty1,_Ty2>::pair(const
std::basic_string<_Elem,_Traits,_Ax> &,
const log4cxx::pattern::PatternConstructor & )'
with
[
_Ty1=const log4cxx::LogString,
_Ty2=log4cxx::pattern::PatternConstructor ,
_Elem=wchar_t,
_Traits=std::char_traits<wchar_t>,
_Ax=std::allocator<wchar_t>
]
while trying to match the argument list '(unsigned short [2],
overloaded-function)'
Regards,
Per Frykenvall
Re: Compile error patternlayout.cpp with visualc++
Posted by Andreas Fester <An...@gmx.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Per Frykenvall wrote:
> Hi,
>
> I checked out HEAD from log4cxx subversion repository yesterday, and
You could try the version at http://www.littletux.net/log4cxx.
It also contains some patches not in SVN yet (among them the
migration to APR 1.2.2), and it also contains WIN32 binaries
and a build log from building those binaries.
It should usually be sufficient to have the right cpptask package
in place and call "ant" to build everything.
Best Regards,
Andreas
- --
Andreas Fester
mailto:andreas@littletux.net
WWW: http://www.littletux.net
ICQ: 326674288
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDZgOoZ3bQVzeW+rsRAgR4AJ9AXOJB6wdbcKAR3AXrets7ZSXd0QCePDRq
6LQ1pjfw2pGMsk5n2tANDUA=
=a8za
-----END PGP SIGNATURE-----