Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.24
-
Boost 1.54, GCC 4.8.2, Centos 5.10
Description
QPID fails to compile with GCC 4.8.2 and Boost 1.54 in C++11 using the compiler flag "-std=c++11".
This problem is caused by a change to Boost's shared_ptr. When compiling in c++11 the shared_pointer interface is changed to match c++11's std::shared_pointer. This causes the boolean conversion operator to be made explicit, preventing the implicit conversion to a boolean when returning a shared_ptr from a function.
To get QPID to compile with GCC 4.8.2 and C++11 extra compiler flags are needed. After running CMake modify the CMakeCache.txt file and set the variable "CMAKE_CXX_FLAGS" to "-std=c++11 -Wno-unused-local-typedefs -Wno-ignored-qualifiers -Wno-deprecated-declarations". Passing the variable to CMake on the command line can cause problems as CMake doesn't like the '=' in the flag "-std=c++11".
Attachments
Attachments
Issue Links
- is duplicated by
-
QPID-5659 C++ not compiling (correctly) as C++11
- Closed