Problems using Borland C++

View: New views
3 Messages — Rating Filter:   Alert me  

Problems using Borland C++

by Jacques63 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I need to compile boost for the first time to build a third party program.

I am using Borland Developer Studio 2006, the compiler is: Borland C++ 5.82 for Win32

The error I get is (file: enable_if.hpp):

[C++ Error] enable_if.hpp(100): E2029 'enable_if_does_not_work_on_this_compiler<void>' must be a previously defined class or struct

I have googled a little and found that this may be becuase my compiler does not support SFINAE
"Substitution Failure Is Not An Error". That "feature" should be avoided by declaring BOOST_NO_SFINAE

That doesn't work.

Other advices to this problem suggest that the compiler is not supported, but boost claims to support it.

Please help

Re: Problems using Borland C++

by Vladimir Prus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday 23 June 2009 Jacques63 wrote:

> I need to compile boost for the first time to build a third party program.
>
> I am using Borland Developer Studio 2006, the compiler is: Borland C++ 5.82
> for Win32
>
> The error I get is (file: enable_if.hpp):
>
> [C++ Error] enable_if.hpp(100): E2029
> 'enable_if_does_not_work_on_this_compiler<void>' must be a previously
> defined class or struct
>
> I have googled a little and found that this may be becuase my compiler does
> not support SFINAE
> "Substitution Failure Is Not An Error". That "feature" should be avoided by
> declaring BOOST_NO_SFINAE
>
> That doesn't work.

enable_if definitely needs SFINAE and cannot be used on compilers that
fail to support it. What libraries do you need? You did not provide the
complete error message so I don't know where this error comes from, but
might want to specify only the desired ones using --with-xxx command line
option to bjam (use bjam --show-libraries for a list).

> Other advices to this problem suggest that the compiler is not supported,
> but boost claims to support it.

Where such a claim is made? In general, no such claims can be made about
*all* of boost.

- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: Problems using Borland C++

by Jacques63 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> What libraries do you need?

filesystem, format, io, barrier, condition, mutex, thread, xtime, xtime_get, shared_ptr

> You did not provide the complete error message so I don't know where this error comes from, but
> might want to specify only the desired ones using

The error is produced by trying to use enable_if which is not defined, probably because the
identification of the compiler sets BOOST_NO_SFINAE to 1 and that skips the definition (My guess.)

  template <class Cond, class T = detail::enable_if_default_T>
  struct enable_if : enable_if_does_not_work_on_this_compiler<T>
  { };

> > Other advices to this problem suggest that the compiler is not supported,
> > but boost claims to support it.

> Where such a claim is made? In general, no such claims can be made about
> *all* of boost.

  I was using boost 1.33.1 as suggested by the author of the software, but have also tried 1.39.0
and neither compiles.

The documentation of 1.33.1 file index.htm, in the FIRST page of that documentation:

"Supported Compilers" includes Borland C++ 5.6.4 on Windows. Which is older than my Borland C++ 5.82
 for Win32. I don't think v 5.6.4 supports SFINAE either.