Re: 'long long' problem on VC++7.1
And here's what's missing.... I'm using the /Za switch (Disable Language
Extensions).
But I'm a bit puzzled. I would have thought that /Za (a more standard
compliant mode) would not fail.
Nick
"Nick Savoiu"
That would be a solution but 'long long' appears in quite a few places. So, I think there's something else that I'm missing...
Nick
"Jeff Garland"
wrote in message news:20031111022332.M81509@crystalclearsoftware.com... On Mon, 10 Nov 2003 14:14:04 -0800, Nick Savoiu wrote
I'm trying to compile some boost code on VC+7.1 but I get:
e:\users\savoiu\Projects\boost-1.30.2\boost\concept_check.hpp(183) : error C2632: 'long' followed by 'long' is illegal
Do I need any #defines when using Boost with VC++7.1 or should it work right out of the box?
I believe this is an error in the concept_check code. Try changing the 'long long' to boost::int64_t.
Jeff
And here's what's missing.... I'm using the /Za switch (Disable Language Extensions).
But I'm a bit puzzled. I would have thought that /Za (a more standard compliant mode) would not fail.
Nick
"Nick Savoiu"
wrote in message news:... That would be a solution but 'long long' appears in quite a few places. So, I think there's something else that I'm missing...
Nick
"Jeff Garland"
wrote in message news:20031111022332.M81509@crystalclearsoftware.com... On Mon, 10 Nov 2003 14:14:04 -0800, Nick Savoiu wrote
I'm trying to compile some boost code on VC+7.1 but I get:
e:\users\savoiu\Projects\boost-1.30.2\boost\concept_check.hpp(183) : error C2632: 'long' followed by 'long' is illegal
Do I need any #defines when using Boost with VC++7.1 or should it work right out of the box?
I believe this is an error in the concept_check code. Try changing
The problem seems to be that BOOST_HAS_LONG_LONG has two different checks to
see if should be defined:
1 @ E:\users\savoiu\Projects\boost\boost\config\suffix.hpp(26):#include
'long
long' to boost::int64_t.
Jeff
The problem seems to be that BOOST_HAS_LONG_LONG has two different checks to see if should be defined:
1 @ E:\users\savoiu\Projects\boost\boost\config\suffix.hpp(26):#include
# if !defined(BOOST_HAS_LONG_LONG) \ && !(defined(BOOST_MSVC) && BOOST_MSVC <=1300) && !defined(__BORLANDC__) \ && (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # define BOOST_HAS_LONG_LONG #endif Adding a '(...) || !defined(_MSC_EXTENSIONS)' to the MSVC test in (1) fixes the problem. But it seems to me that BOOST_HAS_LONG_LONG should only be defined in one place to reduce the possibility of things being out of sync.
Can you let me have a test case please: (1) does *not* result in BOOST_HAS_LONG_LONG getting defined - well not for me anyway with vc7.1 and the /Za option. Thanks, John.
Take the code at:
http://www.boost.org/libs/graph/example/strong_components.cpp
Compile it as is with /W4 and /Za. It compiles albeit with a slew of
warnings.
Now move
#include <iostream>
#include <vector>
before
#include
The problem seems to be that BOOST_HAS_LONG_LONG has two different checks to see if should be defined:
1 @ E:\users\savoiu\Projects\boost\boost\config\suffix.hpp(26):#include
# if !defined(BOOST_HAS_LONG_LONG) \ && !(defined(BOOST_MSVC) && BOOST_MSVC <=1300) && !defined(__BORLANDC__) \ && (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # define BOOST_HAS_LONG_LONG #endif Adding a '(...) || !defined(_MSC_EXTENSIONS)' to the MSVC test in (1) fixes the problem. But it seems to me that BOOST_HAS_LONG_LONG should only be defined in one place to reduce the possibility of things being out of sync.
Can you let me have a test case please: (1) does *not* result in BOOST_HAS_LONG_LONG getting defined - well not for me anyway with vc7.1 and the /Za option.
Thanks,
John.
Compile it as is with /W4 and /Za. It compiles albeit with a slew of warnings.
OK.
Now move
#include <iostream> #include <vector>
before
#include
and recompile.
You should get:
...\boost\boost\concept_check.hpp(183) : error C2632: 'long' followed by 'long' is illegal
Nope, compiles OK for me still: this is with the latest cvs, is that what you're using? John.
Hmm.... I'm using the files from boost-1.30.2.zip.
Nick
"John Maddock"
Compile it as is with /W4 and /Za. It compiles albeit with a slew of warnings.
OK.
Now move
#include <iostream> #include <vector>
before
#include
and recompile.
You should get:
...\boost\boost\concept_check.hpp(183) : error C2632: 'long' followed by 'long' is illegal
Nope, compiles OK for me still: this is with the latest cvs, is that what you're using?
John.
participants (2)
-
John Maddock
-
Nick Savoiu