|
Boost Users : |
Subject: Re: [Boost-users] Can't get boost log example to link
From: Jarrett Chisholm (j.chisholm_at_[hidden])
Date: 2013-07-24 10:53:02
On 22/07/13 05:16 AM, Klaim - Joël Lamotte wrote:
> On Mon, Jul 22, 2013 at 9:00 AM, Leo Carreon <lcarreon_at_[hidden]>wrote:
>
>> If I'm not mistaken, you need to have -DBOOST_LOG_DYN_LINK on the compile
>> and link command lines.
>
> Only if you compiled boost (or got a package where boost) with dynamic
> linking.
> With static linking you don't need this.
>
> However, make sure that you are linking with log_setup too.
>
> Joel Lamotte
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
Ok, so I got my little sample boost log app to work (by adding
-DBOOST_LOG_DYN_LINK to the compiler/linker).
So I fixed up my main application (which is using boost log and also
boost wave). However, I'm getting a crap ton of errors regarding
boost::phoenix (which I don't use, but I guess boost::wave relies on it?)
This all worked with Boost 1.52, so I'm not sure what I'm doing wrong
now...(I'm using boost trunk now).
I'm using the following boost libraries:
boost_log
boost_log_setup
boost_date_time
boost_thread
boost_wave
boost_regex
boost_program_options
and I added the BOOST_ALL_DYN_LINK as a compiler/linker define...
*An excerpt of the errors is*:
...
/usr/local/include/boost/spirit/home/phoenix/core/argument.hpp:87:35:
error: 'boost::phoenix::arg_names::_2' has a previous declaration as
'const boost::phoenix::actor<boost::phoenix::argument<1> >
boost::phoenix::arg_names::_2'
In file included from
/usr/local/include/boost/phoenix/core/preprocessed/argument.hpp:14:0,
from /usr/local/include/boost/phoenix/core/argument.hpp:74,
from
/usr/local/include/boost/log/expressions/formatters/stream.hpp:18,
from
/usr/local/include/boost/log/utility/setup/formatter_parser.hpp:31,
from
/usr/local/include/boost/log/detail/sink_init_helpers.hpp:30,
from
/usr/local/include/boost/log/utility/setup/file.hpp:28,
from src/game/../common/logging/Logger.h:15,
from src/game/Debug.h:11,
from src/game/Game.cpp:15:
/usr/local/include/boost/phoenix/core/preprocessed/argument_predefined_10.hpp:21:143:
error: conflicting declaration 'const type boost::phoenix::arg_names::_3'
In file included from
/usr/local/include/boost/spirit/home/phoenix/core.hpp:16:0,
from
/usr/local/include/boost/spirit/include/phoenix_core.hpp:14,
from
/usr/local/include/boost/spirit/home/support/make_component.hpp:15,
from
/usr/local/include/boost/spirit/home/support/meta_compiler.hpp:20,
from
/usr/local/include/boost/spirit/home/qi/meta_compiler.hpp:14,
from
/usr/local/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi.hpp:14,
from /usr/local/include/boost/spirit/include/qi.hpp:16,
from ../glr/src/glw/shaders/GlrParser.h:17,
from ../glr/src/glw/shaders/GlrShader.h:36,
from ../glr/src/glw/shaders/GlrShaderProgram.h:28,
from ../glr/src/glw/shaders/ShaderProgramManager.h:20,
from ../glr/src/glw/OpenGlDevice.h:20,
from ../glr/src/GlrProgram.h:18,
from ../glr/src/GraphicsEngine.h:13,
from ../glr/src/GLRInclude.h:16,
from src/game/Game.h:18,
from src/game/Game.cpp:10:
/usr/local/include/boost/spirit/home/phoenix/core/argument.hpp:89:35:
error: 'boost::phoenix::arg_names::_3' has a previous declaration as
'const boost::phoenix::actor<boost::phoenix::argument<2> >
boost::phoenix::arg_names::_3'
In file included from
/usr/local/include/boost/phoenix/core/preprocessed/argument.hpp:14:0,
from /usr/local/include/boost/phoenix/core/argument.hpp:74,
from
/usr/local/include/boost/log/expressions/formatters/stream.hpp:18,
from
/usr/local/include/boost/log/utility/setup/formatter_parser.hpp:31,
from
/usr/local/include/boost/log/detail/sink_init_helpers.hpp:30,
from
/usr/local/include/boost/log/utility/setup/file.hpp:28,
from src/game/../common/logging/Logger.h:15,
from src/game/Debug.h:11,
from src/game/Game.cpp:15:
/usr/local/include/boost/phoenix/core/preprocessed/argument_predefined_10.hpp:21:192:
error: conflicting declaration 'const type boost::phoenix::arg_names::_4'
In file included from
/usr/local/include/boost/spirit/home/phoenix/core.hpp:16:0,
from
/usr/local/include/boost/spirit/include/phoenix_core.hpp:14,
from
/usr/local/include/boost/spirit/home/support/make_component.hpp:15,
from
/usr/local/include/boost/spirit/home/support/meta_compiler.hpp:20,
from
/usr/local/include/boost/spirit/home/qi/meta_compiler.hpp:14,
from
/usr/local/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi.hpp:14,
from /usr/local/include/boost/spirit/include/qi.hpp:16,
from ../glr/src/glw/shaders/GlrParser.h:17,
from ../glr/src/glw/shaders/GlrShader.h:36,
from ../glr/src/glw/shaders/GlrShaderProgram.h:28,
from ../glr/src/glw/shaders/ShaderProgramManager.h:20,
from ../glr/src/glw/OpenGlDevice.h:20,
from ../glr/src/GlrProgram.h:18,
from ../glr/src/GraphicsEngine.h:13,
from ../glr/src/GLRInclude.h:16,
from src/game/Game.h:18,
from src/game/Game.cpp:10:
/usr/local/include/boost/spirit/home/phoenix/core/argument.hpp:94:1:
error: 'boost::phoenix::arg_names::_4' has a previous declaration as
'const boost::phoenix::actor<boost::phoenix::argument<3> >
boost::phoenix::arg_names::_4'
In file included from
/usr/local/include/boost/phoenix/core/preprocessed/argument.hpp:14:0,
from /usr/local/include/boost/phoenix/core/argument.hpp:74,
from
/usr/local/include/boost/log/expressions/formatters/stream.hpp:18,
from
/usr/local/include/boost/log/utility/setup/formatter_parser.hpp:31,
from
/usr/local/include/boost/log/detail/sink_init_helpers.hpp:30,
from
/usr/local/include/boost/log/utility/setup/file.hpp:28,
from src/game/../common/logging/Logger.h:15,
from src/game/Debug.h:11,
from src/game/Game.cpp:15:
/usr/local/include/boost/phoenix/core/preprocessed/argument_predefined_10.hpp:21:241:
error: conflicting declaration 'const type boost::phoenix::arg_names::_5'
In file included from
/usr/local/include/boost/spirit/home/phoenix/core.hpp:16:0,
from
/usr/local/include/boost/spirit/include/phoenix_core.hpp:14,
from
/usr/local/include/boost/spirit/home/support/make_component.hpp:15,
from
/usr/local/include/boost/spirit/home/support/meta_compiler.hpp:20,
from
/usr/local/include/boost/spirit/home/qi/meta_compiler.hpp:14,
from
/usr/local/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi.hpp:14,
from /usr/local/include/boost/spirit/include/qi.hpp:16,
from ../glr/src/glw/shaders/GlrParser.h:17,
from ../glr/src/glw/shaders/GlrShader.h:36,
from ../glr/src/glw/shaders/GlrShaderProgram.h:28,
from ../glr/src/glw/shaders/ShaderProgramManager.h:20,
from ../glr/src/glw/OpenGlDevice.h:20,
from ../glr/src/GlrProgram.h:18,
from ../glr/src/GraphicsEngine.h:13,
from ../glr/src/GLRInclude.h:16,
from src/game/Game.h:18,
from src/game/Game.cpp:10:
/usr/local/include/boost/spirit/home/phoenix/core/argument.hpp:94:1:
error: 'boost::phoenix::arg_names::_5' has a previous declaration as
'const boost::phoenix::actor<boost::phoenix::argument<4> >
boost::phoenix::arg_names::_5'
In file included from
/usr/local/include/boost/phoenix/core/preprocessed/argument.hpp:14:0,
from /usr/local/include/boost/phoenix/core/argument.hpp:74,
from
/usr/local/include/boost/log/expressions/formatters/stream.hpp:18,
from
/usr/local/include/boost/log/utility/setup/formatter_parser.hpp:31,
from
/usr/local/include/boost/log/detail/sink_init_helpers.hpp:30,
from
/usr/local/include/boost/log/utility/setup/file.hpp:28,
from src/game/../common/logging/Logger.h:15,
from src/game/Debug.h:11,
from src/game/Game.cpp:15:
/usr/local/include/boost/phoenix/core/preprocessed/argument_predefined_10.hpp:21:290:
error: conflicting declaration 'const type boost::phoenix::arg_names::_6'
In file included from
/usr/local/include/boost/spirit/home/phoenix/core.hpp:16:0,
from
/usr/local/include/boost/spirit/include/phoenix_core.hpp:14,
from
/usr/local/include/boost/spirit/home/support/make_component.hpp:15,
from
/usr/local/include/boost/spirit/home/support/meta_compiler.hpp:20,
from
/usr/local/include/boost/spirit/home/qi/meta_compiler.hpp:14,
from
/usr/local/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi.hpp:14,
from /usr/local/include/boost/spirit/include/qi.hpp:16,
from ../glr/src/glw/shaders/GlrParser.h:17,
from ../glr/src/glw/shaders/GlrShader.h:36,
from ../glr/src/glw/shaders/GlrShaderProgram.h:28,
from ../glr/src/glw/shaders/ShaderProgramManager.h:20,
from ../glr/src/glw/OpenGlDevice.h:20,
from ../glr/src/GlrProgram.h:18,
from ../glr/src/GraphicsEngine.h:13,
from ../glr/src/GLRInclude.h:16,
from src/game/Game.h:18,
from src/game/Game.cpp:10:
/usr/local/include/boost/spirit/home/phoenix/core/argument.hpp:94:1:
error: 'boost::phoenix::arg_names::_6' has a previous declaration as
'const boost::phoenix::actor<boost::phoenix::argument<5> >
boost::phoenix::arg_names::_6'
In file included from
/usr/local/include/boost/phoenix/core/preprocessed/argument.hpp:14:0,
from /usr/local/include/boost/phoenix/core/argument.hpp:74,
from
/usr/local/include/boost/log/expressions/formatters/stream.hpp:18,
from
/usr/local/include/boost/log/utility/setup/formatter_parser.hpp:31,
from
/usr/local/include/boost/log/detail/sink_init_helpers.hpp:30,
from
/usr/local/include/boost/log/utility/setup/file.hpp:28,
from src/game/../common/logging/Logger.h:15,
from src/game/Debug.h:11,
from src/game/Game.cpp:15:
/usr/local/include/boost/phoenix/core/preprocessed/argument_predefined_10.hpp:21:339:
error: conflicting declaration 'const type boost::phoenix::arg_names::_7'
In file included from
/usr/local/include/boost/spirit/home/phoenix/core.hpp:16:0,
from
/usr/local/include/boost/spirit/include/phoenix_core.hpp:14,
from
/usr/local/include/boost/spirit/home/support/make_component.hpp:15,
from
/usr/local/include/boost/spirit/home/support/meta_compiler.hpp:20,
from
/usr/local/include/boost/spirit/home/qi/meta_compiler.hpp:14,
from
/usr/local/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi.hpp:14,
from /usr/local/include/boost/spirit/include/qi.hpp:16,
from ../glr/src/glw/shaders/GlrParser.h:17,
from ../glr/src/glw/shaders/GlrShader.h:36,
from ../glr/src/glw/shaders/GlrShaderProgram.h:28,
from ../glr/src/glw/shaders/ShaderProgramManager.h:20,
from ../glr/src/glw/OpenGlDevice.h:20,
from ../glr/src/GlrProgram.h:18,
from ../glr/src/GraphicsEngine.h:13,
from ../glr/src/GLRInclude.h:16,
from src/game/Game.h:18,
from src/game/Game.cpp:10:
/usr/local/include/boost/spirit/home/phoenix/core/argument.hpp:94:1:
error: 'boost::phoenix::arg_names::_7' has a previous declaration as
'const boost::phoenix::actor<boost::phoenix::argument<6> >
boost::phoenix::arg_names::_7'
In file included from
/usr/local/include/boost/phoenix/core/preprocessed/argument.hpp:14:0,
from /usr/local/include/boost/phoenix/core/argument.hpp:74,
from
/usr/local/include/boost/log/expressions/formatters/stream.hpp:18,
from
/usr/local/include/boost/log/utility/setup/formatter_parser.hpp:31,
from
/usr/local/include/boost/log/detail/sink_init_helpers.hpp:30,
from
/usr/local/include/boost/log/utility/setup/file.hpp:28,
from src/game/../common/logging/Logger.h:15,
from src/game/Debug.h:11,
from src/game/Game.cpp:15:
/usr/local/include/boost/phoenix/core/preprocessed/argument_predefined_10.hpp:21:388:
error: conflicting declaration 'const type boost::phoenix::arg_names::_8'
In file included from
/usr/local/include/boost/spirit/home/phoenix/core.hpp:16:0,
from
/usr/local/include/boost/spirit/include/phoenix_core.hpp:14,
from
/usr/local/include/boost/spirit/home/support/make_component.hpp:15,
from
/usr/local/include/boost/spirit/home/support/meta_compiler.hpp:20,
from
/usr/local/include/boost/spirit/home/qi/meta_compiler.hpp:14,
from
/usr/local/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi.hpp:14,
from /usr/local/include/boost/spirit/include/qi.hpp:16,
from ../glr/src/glw/shaders/GlrParser.h:17,
from ../glr/src/glw/shaders/GlrShader.h:36,
from ../glr/src/glw/shaders/GlrShaderProgram.h:28,
from ../glr/src/glw/shaders/ShaderProgramManager.h:20,
from ../glr/src/glw/OpenGlDevice.h:20,
from ../glr/src/GlrProgram.h:18,
from ../glr/src/GraphicsEngine.h:13,
from ../glr/src/GLRInclude.h:16,
from src/game/Game.h:18,
from src/game/Game.cpp:10:
/usr/local/include/boost/spirit/home/phoenix/core/argument.hpp:94:1:
error: 'boost::phoenix::arg_names::_8' has a previous declaration as
'const boost::phoenix::actor<boost::phoenix::argument<7> >
boost::phoenix::arg_names::_8'
In file included from
/usr/local/include/boost/phoenix/core/preprocessed/argument.hpp:14:0,
from /usr/local/include/boost/phoenix/core/argument.hpp:74,
from
/usr/local/include/boost/log/expressions/formatters/stream.hpp:18,
from
/usr/local/include/boost/log/utility/setup/formatter_parser.hpp:31,
from
/usr/local/include/boost/log/detail/sink_init_helpers.hpp:30,
from
/usr/local/include/boost/log/utility/setup/file.hpp:28,
from src/game/../common/logging/Logger.h:15,
from src/game/Debug.h:11,
from src/game/Game.cpp:15:
/usr/local/include/boost/phoenix/core/preprocessed/argument_predefined_10.hpp:21:437:
error: conflicting declaration 'const type boost::phoenix::arg_names::_9'
In file included from
/usr/local/include/boost/spirit/home/phoenix/core.hpp:16:0,
from
/usr/local/include/boost/spirit/include/phoenix_core.hpp:14,
from
/usr/local/include/boost/spirit/home/support/make_component.hpp:15,
from
/usr/local/include/boost/spirit/home/support/meta_compiler.hpp:20,
from
/usr/local/include/boost/spirit/home/qi/meta_compiler.hpp:14,
from
/usr/local/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi.hpp:14,
from /usr/local/include/boost/spirit/include/qi.hpp:16,
from ../glr/src/glw/shaders/GlrParser.h:17,
from ../glr/src/glw/shaders/GlrShader.h:36,
from ../glr/src/glw/shaders/GlrShaderProgram.h:28,
from ../glr/src/glw/shaders/ShaderProgramManager.h:20,
from ../glr/src/glw/OpenGlDevice.h:20,
from ../glr/src/GlrProgram.h:18,
from ../glr/src/GraphicsEngine.h:13,
from ../glr/src/GLRInclude.h:16,
from src/game/Game.h:18,
from src/game/Game.cpp:10:
/usr/local/include/boost/spirit/home/phoenix/core/argument.hpp:94:1:
error: 'boost::phoenix::arg_names::_9' has a previous declaration as
'const boost::phoenix::actor<boost::phoenix::argument<8> >
boost::phoenix::arg_names::_9'
In file included from
/usr/local/include/boost/phoenix/core/preprocessed/argument.hpp:14:0,
from /usr/local/include/boost/phoenix/core/argument.hpp:74,
from
/usr/local/include/boost/log/expressions/formatters/stream.hpp:18,
from
/usr/local/include/boost/log/utility/setup/formatter_parser.hpp:31,
from
/usr/local/include/boost/log/detail/sink_init_helpers.hpp:30,
from
/usr/local/include/boost/log/utility/setup/file.hpp:28,
from src/game/../common/logging/Logger.h:15,
from src/game/Debug.h:11,
from src/game/Game.cpp:15:
/usr/local/include/boost/phoenix/core/preprocessed/argument_predefined_10.hpp:21:487:
error: conflicting declaration 'const type boost::phoenix::arg_names::_10'
In file included from
/usr/local/include/boost/spirit/home/phoenix/core.hpp:16:0,
from
/usr/local/include/boost/spirit/include/phoenix_core.hpp:14,
from
/usr/local/include/boost/spirit/home/support/make_component.hpp:15,
from
/usr/local/include/boost/spirit/home/support/meta_compiler.hpp:20,
from
/usr/local/include/boost/spirit/home/qi/meta_compiler.hpp:14,
from
/usr/local/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/include/boost/spirit/home/qi.hpp:14,
from /usr/local/include/boost/spirit/include/qi.hpp:16,
from ../glr/src/glw/shaders/GlrParser.h:17,
from ../glr/src/glw/shaders/GlrShader.h:36,
from ../glr/src/glw/shaders/GlrShaderProgram.h:28,
from ../glr/src/glw/shaders/ShaderProgramManager.h:20,
from ../glr/src/glw/OpenGlDevice.h:20,
from ../glr/src/GlrProgram.h:18,
from ../glr/src/GraphicsEngine.h:13,
from ../glr/src/GLRInclude.h:16,
from src/game/Game.h:18,
from src/game/Game.cpp:10:
/usr/local/include/boost/spirit/home/phoenix/core/argument.hpp:94:1:
error: 'boost::phoenix::arg_names::_10' has a previous declaration as
'const boost::phoenix::actor<boost::phoenix::argument<9> >
boost::phoenix::arg_names::_10'
Anyone have any ideas?
Cheers
Jarrett
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net