Opened 10 years ago
Last modified 9 years ago
#8485 new Bugs
Compile error, same as #5431, but Windows Vista (64 bit)
| Reported by: | Owned by: | Peter Dimov | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | smart_ptr |
| Version: | Boost 1.53.0 | Severity: | Problem |
| Keywords: | Cc: |
Description (last modified by )
https://svn.boost.org/trac/boost/ticket/5431
#ifdef _MSC_VER /* This is Microsoft Visual C compiler specific */ #endif //_MSC_VER
Same problem with 1.51.0 and 1.53.0
Change History (12)
comment:1 by , 9 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 9 years ago
Here the needed file to reproduce the error:
testmain.cpp
#include <intrin.h>
#include <boost/lexical_cast.hpp> #include <boost/program_options.hpp>
int main(int argc, char argv) {
printf("Hello\n");
}
I am compiling with VS2008 and 64 Bit C compiler with the following command line:
cl /openmp /favor:INTEL64 /O2 /Fetest.exe /F2097152 /TP /EHsc -I. -Id:\boost_1_53_0 testmain.cpp /link /LIBPATH:d:\boost_1_53_0\lib\x64\lib
This produces the following errors:
Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64 Copyright (C) Microsoft Corporation. All rights reserved.
testmain.cpp C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\memory(996) : error C2733: second C linkage of overloaded funct ion '_InterlockedCompareExchange_np' not allowed
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\memory(995) : see declaration of '_InterlockedCompareEx
change_np' d:\boost_1_53_0\boost/detail/interlocked.hpp(104) : error C2733: second C linkage of overloaded function '_InterlockedCompare ExchangePointer_np' not allowed
d:\boost_1_53_0\boost/detail/interlocked.hpp(104) : see declaration of '_InterlockedCompareExchangePointer_np'
When i remove the include for intrin.h it compiles and runs without problems.
comment:4 by , 9 years ago
| Description: | modified (diff) |
|---|
comment:5 by , 9 years ago
| Milestone: | To Be Determined → Boost 1.54.0 |
|---|
comment:6 by , 9 years ago
| Milestone: | Boost 1.54.0 → To Be Determined |
|---|
I don't reach to reproduce it with msvc 10. Do you have a patch I can test?
comment:8 by , 9 years ago
| Status: | assigned → new |
|---|
comment:9 by , 9 years ago
| Owner: | changed from to |
|---|
comment:10 by , 9 years ago
This is, I believe, the case in which
#include <intrin.h>
#include <utility>
int main() {}
fails. This was a problem with VC++ 8.0 but was supposed to be fixed in 9.0. There's not much we can do about this incompatibility, as it's outside our control.
comment:11 by , 9 years ago
| Owner: | changed from to |
|---|
comment:12 by , 9 years ago
| Owner: | changed from to |
|---|

I'm not sure using
__MSV_VERwould work. Note that it is working without this flag correctly on WINNT.