Boost logo

Boost Users :

From: Robert Fairlie-Cuninghame (robert.fairlie-cuninghame_at_[hidden])
Date: 2008-01-30 20:43:38


Hi all,

I recently applied the Boost.Function critical bug fix (Dec 17) to my
boost 1.34.1 library and I came up against a compilation error. However,
I found that if I removed the boost/tr1/tr1 include path when building
then the fixed library would compile correctly.

Has anyone got the fix to work with the TR1 include paths? I haven't
see any other reports of problems with it.

I'm using gcc 3.3.5. The first compile error is a suspicious
BOOST_FUNCTION_NUM_ARGS redefinition by the TR1 headers. The
compile output was as follows:

C++ build/CommandLineOptions.o
In file included from
release/boost-1_34_1/boost/preprocessor/iteration/detail/iter/forward1.hpp:47,
                from release/boost-1_34_1/boost/function.hpp:62,
                from release/boost-1_34_1/boost/tr1/functional.hpp:99,
                from release/boost-1_34_1/boost/tr1/tr1/functional:27,
                from
release/boost-1_34_1/boost/function/function_base.hpp:18,
                from
release/boost-1_34_1/boost/function/detail/prologue.hpp:16,
                from
release/boost-1_34_1/boost/function/function_template.hpp:12,
                from
release/boost-1_34_1/boost/function/detail/maybe_include.hpp:18,
                from release/boost-1_34_1/boost/function/function1.hpp:11,
                from
release/boost-1_34_1/boost/program_options/value_semantic.hpp:13,
                from
release/boost-1_34_1/boost/program_options/options_description.hpp:13,
                from release/boost-1_34_1/boost/program_options.hpp:13,
                from src/CommandLineOptions.cpp:26:
release/boost-1_34_1/boost/function/detail/function_iterate.hpp:13:1:
"BOOST_FUNCTION_NUM_ARGS" redefined
******** note first error here *******
In file included from
release/boost-1_34_1/boost/program_options/value_semantic.hpp:13,
                from
release/boost-1_34_1/boost/program_options/options_description.hpp:13,
                from release/boost-1_34_1/boost/program_options.hpp:13,
                from src/CommandLineOptions.cpp:26:
release/boost-1_34_1/boost/function/function1.hpp:10:1: this is the
location of the previous definition
In file included from
release/boost-1_34_1/boost/function/detail/maybe_include.hpp:13,
                from
release/boost-1_34_1/boost/function/detail/function_iterate.hpp:14,
                from
release/boost-1_34_1/boost/preprocessor/iteration/detail/iter/forward1.hpp:47,
                from release/boost-1_34_1/boost/function.hpp:62,
                from release/boost-1_34_1/boost/tr1/functional.hpp:99,
                from release/boost-1_34_1/boost/tr1/tr1/functional:27,
                from
release/boost-1_34_1/boost/function/function_base.hpp:18,
                from
release/boost-1_34_1/boost/function/detail/prologue.hpp:16,
                from
release/boost-1_34_1/boost/function/function_template.hpp:12,
                from
release/boost-1_34_1/boost/function/detail/maybe_include.hpp:18,
                from release/boost-1_34_1/boost/function/function1.hpp:11,
                from
release/boost-1_34_1/boost/program_options/value_semantic.hpp:13,
                from
release/boost-1_34_1/boost/program_options/options_description.hpp:13,
                from release/boost-1_34_1/boost/program_options.hpp:13,
                from src/lCommandLineOptions.cpp:26:
release/boost-1_34_1/boost/function/function_template.hpp:98: error:
variable
  declaration is not allowed here
release/boost-1_34_1/boost/function/function_template.hpp:98: error: syntax
  error before `{' token

.... and then a bunch more errors before it gives up.

If anyone else has got this scenario to work then I'll know it must be
something screwy in our setup.

Cheers,

Robert.


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