【发布时间】:2015-10-19 04:14:02
【问题描述】:
我一直在使用 log4cxx,它可以满足我的需要。我们正在迁移到 VS 2015,我发现当我尝试重建 log4cxx 0.10.0.1 时,Visual Studio 2015 中的编译器会抛出错误。如果我将项目工具集更改为 Visual Studio 2013 (v120),构建仍然有效,但是当我尝试使用它时,它会在运行时出现问题。
请参阅下面的错误消息,它在多个场合出现。
有没有人找到使用 Visual Studio 2015 正确构建 log4cxx 的方法?
4>..\..\Log4cxx\log4cxx\apache-log4cxx-0.10.0\src\main\include\log4cxx/layout.h(90): error C2248: 'log4cxx::helpers::ObjectImpl::ObjectImpl': cannot access private member declared in class 'log4cxx::helpers::ObjectImpl'
4>..\..\Log4cxx\log4cxx\apache-log4cxx-0.10.0\src\main\include\log4cxx/helpers/objectimpl.h(43): note: see declaration of 'log4cxx::helpers::ObjectImpl::ObjectImpl'
4>..\..\SDKS\Log4cxx\log4cxx\apache-log4cxx-0.10.0\src\main\include\log4cxx/helpers/objectimpl.h(28): note: see declaration of 'log4cxx::helpers::ObjectImpl'
4>..\..\SDKS\Log4cxx\log4cxx\apache-log4cxx-0.10.0\src\main\include\log4cxx/layout.h(90): note: This diagnostic occurred in the compiler generated function 'log4cxx::Layout::Layout(const log4cxx::Layout &)'
【问题讨论】:
-
显示类定义。
标签: c++ visual-studio visual-studio-2015 log4cxx