[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppBoostCompileError
The more recent the version you use, the less compile errors you will have. For example, the Boost Graph library can be used without problems in Visual C++ 2005, but not in Visual C++ 6.0.
Using Google to find fixes for compile errors, sometimes adding one of the three defines below is suggested. Perhaps they will work for you?
denotes solved,
denotes unsolved yet):
Writing the code below gets boost/tuple/detail/tuple_basic.hpp to compile:
#include boost/ref.hpp first:
This will yield the code below, which works!
Do not do:
Writing the code below above the desired headers, changes the error to [C++ Error] if.hpp(66): E2401 Invalid template argument list, which is described below
Note that it does matter where you #include it. I had to put it first, do to some workaround #defines.
The compiler takes you to the code below:

No idea how to solve it
Solution: #include type_traits first.
This will result in another compile error, '[C++ Error] template_arity.hpp(34): E2316 'has_rebind' is not a member of 'aux''
You can #include the header file with the has_rebind function before or after the type_traits header file, yielding two different compile errors:
This code below will result in the compile error '[C++ Error] is_abstract.hpp(117): E2316 'is_class' is not a member of 'boost''
This code below will result in the compile error '[C++ Error] full_lambda.hpp(103): E2451 Undefined symbol 'quote1''
Changing the code to the code below, results in a new compile error 'full_lambda.hpp(103): E2451 Undefined symbol 'quote1''
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppBoostCompileError
(C++) Boost compile errors
For STL compile errors see compile errors.The more recent the version you use, the less compile errors you will have. For example, the Boost Graph library can be used without problems in Visual C++ 2005, but not in Visual C++ 6.0.
Using Google to find fixes for compile errors, sometimes adding one of the three defines below is suggested. Perhaps they will work for you?
- define BOOST_REGEX_USE_VCL
- define BOOST_NO_OPERATORS_IN_NAMESPACE
- define BOOST_NO_STD_LOCALE
Troubleshooting
Boost gives compile errors under C++ Builder 6.0
Boost is tested on the Borland compiler version 5.6.4. If you have an older version of this compiler, it won't work. You can check it out, by running /CBuilder6/Bin/Bcc32.exe (the compiler's name). This will let it give its version number. As a solution, you can either find somewhere (let me know if you know where) an updated version, or (what I did) I copied bcc32.exe from C++ BuilderX over the C++ Builder's bcc32.exe. This immediatly worked correct!Some compile errors
Overview (
(C++ Builder 6) [C++ Error] tuple_basic.hpp(156): E2238 Multiple declaration for 'element<N,T>'
(C++ Builder 6) [C++ Error] tuple_basic.hpp(741): E2451 Undefined symbol 'reference_wrapper'
(C++ Builder 6) [C++ Error] facade_iterator_category.hpp(158): E2439 'typename' is only allowed in template declarations
(C++ Builder 6) [C++ Error] tuple_basic.hpp(636): E2268 Call to undefined function 'BOOST_STATIC_ASSERT'
(C++ Builder 6) [C++ Error] if.hpp(66): E2401 Invalid template argument list
(Borland Developer Studio 2006) [C++ Error] lambda_traits.hpp(500): E2231 Member bind_type_generator<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::nof_elems cannot be used without an object
(Visual Studio 6) lambda_fwd.hpp(26) : fatal error C1001: INTERNAL COMPILER ERROR
(Turbo C++ 2006) [C++ Error] is_enum.hpp(95): E2316 'is_convertible' is not a member of 'boost'
(Turbo C++ 2006) [C++ Error] template_arity.hpp(34): E2316 'has_rebind' is not a member of 'aux'
(Turbo C++ 2006) [C++ Error] is_abstract.hpp(117): E2316 'is_class' is not a member of 'boost'
(Turbo C++ 2006) [C++ Error] full_lambda.hpp(103): E2451 Undefined symbol 'quote1'
(C++ Builder 6) [C++ Error] tuple_basic.hpp(156): E2238 Multiple declaration for 'element<N,T>'
Happens when boost/tuple/detail/tuple_basic.hpp is #included. This header file is called among others from the graph library.Writing the code below gets boost/tuple/detail/tuple_basic.hpp to compile:
- include <boost/ref.hpp>
- define BOOST_NO_CV_SPECIALIZATIONS
- include <boost/tuple/detail/tuple_basic.hpp>
(C++ Builder 6) [C++ Error] tuple_basic.hpp(741): E2451 Undefined symbol 'reference_wrapper'
Happens when you write
- define BOOST_NO_CV_SPECIALIZATIONS
- include <boost/tuple/detail/tuple_basic.hpp>
#include boost/ref.hpp first:
- include <boost/ref.hpp>
- define BOOST_NO_CV_SPECIALIZATIONS
- include <boost/tuple/detail/tuple_basic.hpp>
(C++ Builder 6) [C++ Error] facade_iterator_category.hpp(158): E2439 'typename' is only allowed in template declarations
In the original code below, remove the keyword typename
BOOST_STATIC_ASSERT(
!(is_convertible<
typename iterator_category_to_traversal<Category>::type
, Traversal
>::value)); //Bilderbikkel: Error in this line
This will yield the code below, which works!
BOOST_STATIC_ASSERT(
!(is_convertible<
iterator_category_to_traversal<Category>::type
, Traversal
>::value));
Do not do:
Writing the code below above the desired headers, changes the error to [C++ Error] if.hpp(66): E2401 Invalid template argument list, which is described below
- define BOOST_MSVC 1299
- include <boost/iterator/detail/facade_iterator_category.hpp>
(C++ Builder 6) [C++ Error] tuple_basic.hpp(636): E2268 Call to undefined function 'BOOST_STATIC_ASSERT'
Easy, just #include it:
- include <boost/static_assert.hpp>
Note that it does matter where you #include it. I had to put it first, do to some workaround #defines.
(C++ Builder 6) [C++ Error] if.hpp(66): E2401 Invalid template argument list
Happens if you write
- define BOOST_MSVC 1299
- include <boost/iterator/detail/facade_iterator_category.hpp>
The compiler takes you to the code below:
// agurt, 05/sep/04: nondescriptive parameter names for the sake of DigitalMars // (and possibly MWCW < 8.0); see http://article.gmane.org/gmane.comp.lib.boost.devel/108959 template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename BOOST_MPL_AUX_NA_PARAM(T3) > struct if_ { private: // agurt, 02/jan/03: two-step 'type' definition for the sake of aCC typedef if_c<BOOST_MPL_AUX_VALUE_WKND(T1)::value //Bilderbikkel: compiler goes this way
- if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS)
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
- else
, T2 , T3 //Bilderbikkel: Error caused by this line > almost_type_; public: typedef typename almost_type_::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(T1,T2,T3)) };
- endif
(Borland Developer Studio 2006) [C++ Error] lambda_traits.hpp(500): E2231 Member bind_type_generator<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::nof_elems cannot be used without an object
No idea how to solve this(Visual Studio 6) lambda_fwd.hpp(26) : fatal error C1001: INTERNAL COMPILER ERROR
Happens on #include <boost/lambda/lambda.hpp>. The full error message is:d:\program files\microsoft visual studio\vc98\include\boost\lambda\detail\lambda_fwd.hpp(26) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information
No idea how to solve it
(Turbo C++ 2006) [C++ Error] is_enum.hpp(95): E2316 'is_convertible' is not a member of 'boost'
Can be produced by the following program:int main() { boost::adjacency_list g; }
- include <boost/graph/adjacency_list.hpp>
Solution: #include type_traits first.
int main() { boost::adjacency_list<> g; }
- include <boost/type_traits.hpp>
- include <boost/graph/adjacency_list.hpp>
This will result in another compile error, '[C++ Error] template_arity.hpp(34): E2316 'has_rebind' is not a member of 'aux''
(Turbo C++ 2006) [C++ Error] template_arity.hpp(34): E2316 'has_rebind' is not a member of 'aux'
Happens in the code below:int main() { boost::adjacency_list<> g; }
- include <boost/type_traits.hpp>
- include <boost/graph/adjacency_list.hpp>
You can #include the header file with the has_rebind function before or after the type_traits header file, yielding two different compile errors:
This code below will result in the compile error '[C++ Error] is_abstract.hpp(117): E2316 'is_class' is not a member of 'boost''
int main() { boost::adjacency_list g; }
- include <boost/mpl/aux_/has_rebind.hpp>
- include <boost/type_traits.hpp>
- include <boost/graph/adjacency_list.hpp>
This code below will result in the compile error '[C++ Error] full_lambda.hpp(103): E2451 Undefined symbol 'quote1''
int main() { boost::adjacency_list<> g; }
- include <boost/type_traits.hpp>
- include <boost/mpl/aux_/has_rebind.hpp>
- include <boost/graph/adjacency_list.hpp>
(Turbo C++ 2006) [C++ Error] is_abstract.hpp(117): E2316 'is_class' is not a member of 'boost'
Happens in this codeint main() { boost::adjacency_list<> g; }
- include <boost/mpl/aux_/has_rebind.hpp>
- include <boost/type_traits.hpp>
- include <boost/graph/adjacency_list.hpp>
Changing the code to the code below, results in a new compile error 'full_lambda.hpp(103): E2451 Undefined symbol 'quote1''
int main() { boost::adjacency_list<> g; }
- define BOOST_NO_IS_ABSTRACT
- include <boost/mpl/aux_/has_rebind.hpp>
- include <boost/type_traits.hpp>
- include <boost/graph/adjacency_list.hpp>
(Turbo C++ 2006) [C++ Error] full_lambda.hpp(103): E2451 Undefined symbol 'quote1'
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
