[integer] Compilation failed in Visual Studio

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

[integer] Compilation failed in Visual Studio

by Adam Badura :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    Following simple program:

#include <boost/integer_fwd.hpp>

int main()
{
    return 0;
}

does not compile in Visual Studio 2008 with Boost 1.40.0. Compilation errors
are following:

1>d:\libraries\boost_1_40_0\boost\integer_fwd.hpp(70) : error C2039:
'long_long_type' : is not a member of 'boost'
1>d:\libraries\boost_1_40_0\boost\integer_fwd.hpp(70) : error C2065:
'long_long_type' : undeclared identifier
1>d:\libraries\boost_1_40_0\boost\integer_fwd.hpp(70) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>d:\libraries\boost_1_40_0\boost\integer_fwd.hpp(73) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template

    Adam Badura


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

Re: [integer] Compilation failed in Visual Studio

by Steven Watanabe-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

AMDG

Adam Badura wrote:

>    Following simple program:
>
> #include <boost/integer_fwd.hpp>
>
> int main()
> {
>    return 0;
> }
>
> does not compile in Visual Studio 2008 with Boost 1.40.0. Compilation
> errors are following:
>
> 1>d:\libraries\boost_1_40_0\boost\integer_fwd.hpp(70) : error C2039:
> 'long_long_type' : is not a member of 'boost'
> 1>d:\libraries\boost_1_40_0\boost\integer_fwd.hpp(70) : error C2065:
> 'long_long_type' : undeclared identifier
> 1>d:\libraries\boost_1_40_0\boost\integer_fwd.hpp(70) : error C2913:
> explicit specialization; 'boost::integer_traits' is not a
> specialization of a class template
> 1>d:\libraries\boost_1_40_0\boost\integer_fwd.hpp(73) : error C2913:
> explicit specialization; 'boost::integer_traits' is not a
> specialization of a class template

It compiles fine for me.  Can you try running just
cl -Id:\libraries\boost_1_40_0 <test file>.cpp
to check whether it's the result of some compiler option?
Here's what I get:

C:\Documents and Settings\Steven\My Documents\Visual Studio
2008\Projects\scratc
h\scratch>cl scratch.cpp -I"C:\Documents and Settings\Steven\My
Documents\boost_
1_40_0\boost_1_40_0"
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08
for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

scratch.cpp
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:scratch.exe
scratch.obj

C:\Documents and Settings\Steven\My Documents\Visual Studio
2008\Projects\scratc
h\scratch>type scratch.cpp
#include <boost/integer_fwd.hpp>

int main()
{
   return 0;
}

In Christ,
Steven Watanabe

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

Re: [integer] Compilation failed in Visual Studio

by Adam Badura :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> It compiles fine for me.  Can you try running just
> cl -Id:\libraries\boost_1_40_0 <test file>.cpp
> to check whether it's the result of some compiler option?

    That compiled fine.

    And I identified the option. If "Disable Language Extensions" (/Za) is
set to "Yes" the errors appear. The same seems to be true with VS 2005 since
I experience there the same error messages and the option was active as
well. Can we do anything about it?

    Adam Badura


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

Re: [integer] Compilation failed in Visual Studio

by Adam Badura :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    Is any one working on this issue?

    Adam Badura

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

Re: [integer] Compilation failed in Visual Studio

by Michael Mathews-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This little snippet complies fine with the /Ze switch which enables
Microsoft extensions

#include <boost/integer.hpp>
int main(){
    return 0;
}
But if you disable microsoft extensions with the /Za switch then you get the
following errors mess of errors.


1>c:\boost\include\boost-1_40\boost\integer_fwd.hpp(70) : error C2039:
'long_long_type' : is not a member of 'boost'
1>c:\boost\include\boost-1_40\boost\integer_fwd.hpp(70) : error C2065:
'long_long_type' : undeclared identifier
1>c:\boost\include\boost-1_40\boost\integer_fwd.hpp(70) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_fwd.hpp(73) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(67) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(73) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(79) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(85) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(119) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(126) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(132) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(138) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(144) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(150) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer_traits.hpp(156) : error C2913:
explicit specialization; 'boost::integer_traits' is not a specialization of
a class template
1>c:\boost\include\boost-1_40\boost\integer.hpp(88) : error C2065:
'const_max' : undeclared identifier
1>        c:\boost\include\boost-1_40\boost\integer.hpp(94) : see reference
to class template instantiation 'boost::int_max_value_t<MaxValue>' being
compiled
1>c:\boost\include\boost-1_40\boost\integer.hpp(89) : error C2065:
'const_max' : undeclared identifier
1>c:\boost\include\boost-1_40\boost\integer.hpp(90) : error C2065:
'const_max' : undeclared identifier
1>c:\boost\include\boost-1_40\boost\integer.hpp(91) : error C2065:
'const_max' : undeclared identifier
1>c:\boost\include\boost-1_40\boost\integer.hpp(101) : error C2065:
'const_min' : undeclared identifier
1>        c:\boost\include\boost-1_40\boost\integer.hpp(107) : see reference
to class template instantiation 'boost::int_min_value_t<MinValue>' being
compiled
1>c:\boost\include\boost-1_40\boost\integer.hpp(102) : error C2065:
'const_min' : undeclared identifier
1>c:\boost\include\boost-1_40\boost\integer.hpp(103) : error C2065:
'const_min' : undeclared identifier
1>c:\boost\include\boost-1_40\boost\integer.hpp(104) : error C2065:
'const_min' : undeclared identifier
1>c:\boost\include\boost-1_40\boost\integer.hpp(116) : error C2065:
'const_max' : undeclared identifier
1>        c:\boost\include\boost-1_40\boost\integer.hpp(122) : see reference
to class template instantiation 'boost::uint_value_t<Value>' being compiled
1>c:\boost\include\boost-1_40\boost\integer.hpp(117) : error C2065:
'const_max' : undeclared identifier
1>c:\boost\include\boost-1_40\boost\integer.hpp(118) : error C2065:
'const_max' : undeclared identifier
1>c:\boost\include\boost-1_40\boost\integer.hpp(119) : error C2065:
'const_max' : undeclared identifier
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [integer] Compilation failed in Visual Studio

by Olaf van der Spek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 26, 2009 at 9:53 PM, Michael Mathews <muckjail@...> wrote:

> This little snippet complies fine with the /Ze switch which enables
> Microsoft extensions
>
> #include <boost/integer.hpp>
> int main(){
>    return 0;
> }
> But if you disable microsoft extensions with the /Za switch then you get the
> following errors mess of errors.
>
>
> 1>c:\boost\include\boost-1_40\boost\integer_fwd.hpp(70) : error C2039:
> 'long_long_type' : is not a member of 'boost'

Maybe long long is a MS extension? It's not yet part of standard C++.

Olaf
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [integer] Compilation failed in Visual Studio

by John Maddock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> This little snippet complies fine with the /Ze switch which enables
> Microsoft extensions
>
> #include <boost/integer.hpp>
> int main(){
>    return 0;
> }
> But if you disable microsoft extensions with the /Za switch then you get
> the
> following errors mess of errors.
>

It appears this has been fixed in Trunk for a while, but the library
maintainer hasn't merged to release, either for 1.40 or 1.41 :-(

Probably the best thing to do is file a bug report at svn.boost.org.

Sorry I can't be more helpful, John.

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

Re: [integer] Compilation failed in Visual Studio

by Michael Mathews-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Done

Ticket #3568

On Tue, Oct 27, 2009 at 4:57 AM, John Maddock <john@...> wrote:

>>
>> This little snippet complies fine with the /Ze switch which enables
>> Microsoft extensions
>>
>> #include <boost/integer.hpp>
>> int main(){
>>   return 0;
>> }
>> But if you disable microsoft extensions with the /Za switch then you get the
>> following errors mess of errors.
>>
>
> It appears this has been fixed in Trunk for a while, but the library maintainer hasn't merged to release, either for 1.40 or 1.41 :-(
>
> Probably the best thing to do is file a bug report at svn.boost.org.
>
> Sorry I can't be more helpful, John.
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [integer] Compilation failed in Visual Studio- previously reported?

by jeremyShiers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Its interesting that a problem was reported here on 7 July 2009
    http://lists.boost.org/Archives/boost/2009/07/153798.php
and here on 7 September 2009
   
http://www.nabble.com/-1.40.0--Compilation-errors-in-Visual-Studio-tt25336422.html#a25336422

but it didnt seem to click until today with John Maddock's post

cheers

Jeremy

John Maddock wrote:

>> This little snippet complies fine with the /Ze switch which enables
>> Microsoft extensions
>>
>> #include <boost/integer.hpp>
>> int main(){
>>    return 0;
>> }
>> But if you disable microsoft extensions with the /Za switch then you
>> get the
>> following errors mess of errors.
>>
>
> It appears this has been fixed in Trunk for a while, but the library
> maintainer hasn't merged to release, either for 1.40 or 1.41 :-(
>
> Probably the best thing to do is file a bug report at svn.boost.org.
>
> Sorry I can't be more helpful, John.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
>

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

Re: [integer] Compilation failed in Visual Studio

by Adam Badura :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    Finally. Thanks for taking care.
    I hope the problem will disappear in 1.41.

    Adam Badura

"Adam Badura" <abadura@...> wrote in message
news:h8pv01$84h$1@......
>    Is any one working on this issue?
>
>    Adam Badura
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>

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