Opened 10 years ago
Last modified 9 years ago
#8485 new Bugs
Compile error, same as #5431, but Windows Vista (64 bit) — at Version 4
| Reported by: | Owned by: | viboes | |
|---|---|---|---|
| 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 (4)
comment:1 by , 10 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) |
|---|

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