Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-12-14 12:36:59


prateek khanna <prateek_at_[hidden]> writes:

> Hi,
>
> I am using Boost for the first time and now i am stuck when i try to
> compile code in Linux. We have Linux RHEL 7.2 and g++ 2.96. I managed
> to execute the sample code Simple_ls in Windows VC++ 6, but when I try
> to compile the same code in Linux it gives me many errors.
> I am using follow command to compile my linux code.
> g++ -c -I /usr/local/include/boost-1_33_1/ -L /usr/local/lib
> Simple_ls.cpp
> I have attached a file which contains the error i am getting. I have
> never worked on Linux earlier, so i think most probably I am missing
> out on making some setting in Linux environment or macros
> If somebody can help me, I would be very grateful. :-)

Hi Prateek,

(Just adding the library name to the subject line so the author might
notice. see http://www.boost.org/more/discussion_policy.htm#effective)

I am guessing there's a missing #include in the filesystem library and
that you may be able to work around it by adding

    #include <boost/type_traits/is_function.hpp>

before you #include any filesystem headers. However, only Beman can
say for sure.

> /usr/local/include/boost-1_33_1/boost/mpl/if.hpp: 67: instantiated from
> `boost::mpl::and_<boost::is_POD<boost::filesystem::path>,
> boost::detail::iterator_writability_disabled<boost::filesystem::path,
> boost::filesystem::path &>, mpl_::bool_<true>, mpl_::bool_<true>,
> mpl_::bool_<true> >'
> /usr/local/include/boost-1_33_1/boost/mpl/if.hpp: 67: instantiated from
> `boost::mpl::aux::nested_type_wknd<boost::mpl::and_<boost::is_POD<boost::filesystem::path>,
> boost::detail::iterator_writability_disabled<boost::filesystem::path,
> boost::filesystem::path &>, mpl_::bool_<true>, mpl_::bool_<true>,
> mpl_::bool_<true> > >'
> /usr/local/include/boost-1_33_1/boost/mpl/if.hpp: 67: instantiated from
> `boost::mpl::not_<boost::mpl::and_<boost::is_POD<boost::filesystem::path>,
> boost::detail::iterator_writability_disabled<boost::filesystem::path,
> boost::filesystem::path &>, mpl_::bool_<true>, mpl_::bool_<true>,
> mpl_::bool_<true> > >'
> /usr/local/include/boost-1_33_1/boost/mpl/if.hpp: 67: instantiated from
> `boost::detail::use_operator_brackets_proxy<boost::filesystem::path,
> boost::filesystem::path &>'
> /usr/local/include/boost-1_33_1/boost/mpl/if.hpp: 67: instantiated from
> `boost::mpl::if_<boost::detail::use_operator_brackets_proxy<boost::filesystem::path,
> boost::filesystem::path &>,
> boost::detail::operator_brackets_proxy<boost::filesystem::directory_iterator>,
> boost::filesystem::path>'
> /usr/local/include/boost-1_33_1/boost/iterator/iterator_facade.hpp: 391: instantiated
> from
> `boost::detail::operator_brackets_result<boost::filesystem::directory_iterator,
> boost::filesystem::path, boost::filesystem::path &>'
> /usr/local/include/boost-1_33_1/boost/iterator/iterator_facade.hpp: 654: instantiated
> from
> `boost::iterator_facade<boost::filesystem::directory_iterator,
> boost::filesystem::path, boost::single_pass_traversal_tag,
> boost::filesystem::path &, ptrdiff_t>'
> /usr/local/include/boost-1_33_1/boost/filesystem/operations.hpp: 110: instantiated
> from here
> /usr/local/include/boost-1_33_1/boost/type_traits/is_enum.hpp: 123: base class
> `boost: :type_traits::is_function_ptr_helper<boost::filesystem::path *>' has
> incomplete type

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk