Giter Site home page Giter Site logo

Support for C++11 about simpleamqpclient HOT 13 OPEN

alanxz avatar alanxz commented on July 28, 2024
Support for C++11

from simpleamqpclient.

Comments (13)

thomasmarsh avatar thomasmarsh commented on July 28, 2024

I won't assert that this fixes all -std=c++0x compilation issues, but we had to make the following change in SimpleAmqpClient/BasicMessage.h:

Replacing the line

#include <boost/make_shared.hpp>

with:

#ifdef BOOST_HAS_RVALUE_REFS
#undef BOOST_HAS_RVALUE_REFS
#include <boost/make_shared.hpp>
#define BOOST_HAS_RVALUE_REFS
#else
#include <boost/make_shared.hpp>
#endif

from simpleamqpclient.

alanxz avatar alanxz commented on July 28, 2024

What version of gcc and boost were you using?

from simpleamqpclient.

thomasmarsh avatar thomasmarsh commented on July 28, 2024

In our case, this fix was for gcc 4.6.3, boost 1.52.0.

from simpleamqpclient.

fabiomargarido avatar fabiomargarido commented on July 28, 2024

I've just confirmed that this change fixes the particular issue I was having with -std=c++0x on gcc 4.6.3 and boost 1.51.0.

from simpleamqpclient.

thomasmarsh avatar thomasmarsh commented on July 28, 2024

I should have said in my first post: clearly this is a hack; we haven't had a chance to identify the correct solution.

from simpleamqpclient.

SAbruzzo avatar SAbruzzo commented on July 28, 2024

I have another work around which works also with boost 1.53.0 and SimpleAmqpClient 2.2.0

#define BOOST_NO_CXX11_RVALUE_REFERENCES
#include <SimpleAmqpClient/SimpleAmqpClient.h>

from simpleamqpclient.

alanxz avatar alanxz commented on July 28, 2024

@SAbruzzo - what compiler did that workaround work for?

from simpleamqpclient.

SAbruzzo avatar SAbruzzo commented on July 28, 2024

@alanxz : silvio@pc:~$ g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

and I use -std=c++0x

from simpleamqpclient.

alanxz avatar alanxz commented on July 28, 2024

Workaround for compiling on Mac OS X/Clang under std=c++-11

Add the following cmake flags:

-DCMAKE_CXX_FLAGS="-std=c++-11 -stdlib=libc++ -DGTEST_USE_OWN_TR1_TUPLE=1"

from simpleamqpclient.

vikaschamp avatar vikaschamp commented on July 28, 2024

Hello Friends ,

I have installed SimpleAmqpClient library in visual studio from nuget package .
I have just added header #include <SimpleAmqpClient/SimpleAmqpClient.h> and execute my program then it is showing SSLEAY32.dll missing . Please suggest me what should i do.

Thanks in advance

from simpleamqpclient.

alanxz avatar alanxz commented on July 28, 2024

@vikaschamp you likely need to install OpenSSL.

from simpleamqpclient.

capsocrates avatar capsocrates commented on July 28, 2024

Unconditionally disabling rvalues for boost::shared_ptr in the library seems like a very bad idea. It seems like it could also lead to ODR violations.

from simpleamqpclient.

alanxz avatar alanxz commented on July 28, 2024

@capsocrates yup. The path forward here is likely not to enable/disable rvalue references, but to replace boost::shared_ptr with something like std::unique_ptr.

from simpleamqpclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.