The most recent openbabel-devel rpm package for Fedora 22
openbabel-devel-2.3.2-11 still has in shared_ptr.h

#ifdef USE_BOOST
  #include <boost/shared_ptr.hpp>
  #define shared_ptr boost::shared_ptr
#else
  #include <memory>
  #if __GNUC__ == 4  //&& __GNUC_MINOR__ < 3  removed at the suggestion of
Konst
antin Tokarev
    #include <tr1/memory>
  #endif
  using std::tr1::shared_ptr;
#endif

The current version of GCC on Fedora 22 is gcc-5.1.1-4.fc22 and it comes
with
shared_ptr in std. I realize this has most likely been fixed already in OB
source,
but the rpm package is still in fedora repos and is rather unusable.

Just thought I point it out.
And for those who will google this message with the same problem -
error: 'std::tr1' has not been declared

here is the trivial fix - put the following in
/usr/include/openbabel-2.0/openbabel/shared_ptr.h

#ifdef USE_BOOST
  #include <boost/shared_ptr.hpp>
  #define shared_ptr boost::shared_ptr
#else
  #include <memory>
  #if __GNUC__ == 4
    #include <tr1/memory>
  #endif
#if __GNUC__ < 5
  using std::tr1::shared_ptr;
#else
  using std::shared_ptr;
#endif
#endif

Your code will probably need to be compiled with -std=c++11 option.

Igor
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to