Sorry, just realized fixing those errors is incredibly silly - just add an
explicit conversion to bool (istream and ostream lost the implicit
conversion in C++11).
Incidentally, orcaformat.cpp doesn't compile because it can't find regex.h
.
Itay.
From: Itay Zandbank [mailto:i...@zmbq.com]
Sent: Monday, July 28, 2014 10:49 AM
To: 'Matthew Swain'
Cc: 'openbabel-discuss@lists.sourceforge.net'
Subject: RE: [Open Babel] OpenBabel and C++11
Thanks, but the development version does not compile well on Visual Studio
2013. I need the minimal build (openbabel.dll and some formats), but here is
what I have already found:
1) I must add #include <algorithm> to babelconfig, because std::min and
std::max were moved.
2) formats_misc does not compile because of two errors:
a. "return cannot convert from std::istream to bool" in
checkdrawcdx.cpp (CDXReader::operator bool ())
b. Return ifs!=NULL in ChemKinFormat::ReadReactionQualifierLines
doesn't compile, either.
There are a lot more errors in other modules, mainly linker complaints
about multiply defined entries, but these are not in the bare minimums I
need now, so I'm just compiling the DLL and OBFs I need.
I'll circumvent the above errors (I can just drop the two offending files
from the libraries I build - I don't need these specific formats), but these
errors should still be fixed. I haven't tried compiling on Ubuntu yet, this
will come next, once I get what I need working on Windows.
Itay.
From: Matthew Swain [mailto:m.sw...@me.com]
Sent: Sunday, July 27, 2014 6:41 PM
To: Itay Zandbank
Cc: openbabel-discuss@lists.sourceforge.net
<mailto:openbabel-discuss@lists.sourceforge.net>
Subject: Re: [Open Babel] OpenBabel and C++11
I believe the latest development version does support C++11.
I think the relevant changes since 2.3.2 are here:
https://github.com/openbabel/openbabel/pull/34
https://github.com/openbabel/openbabel/pull/62
You could either apply those changes to 2.3.2 manually, or just use the
latest development version which is relatively stable.
Matt
On 22 Jul 2014, at 22:17, Itay Zandbank <i...@zmbq.com
<mailto:i...@zmbq.com> > wrote:
Hi.
I've inherited a project that uses OpenBabel. The project is quite messy
and needs a lot of organizing. Since it's written in a strange C/C++ hybrid,
I want to modify it so that its code is modern C++ code. And by modern I
hope to be able to use C++11.
Unfortunately, I can't get OpenBabel to work with C++11. Compiling it on
Visual Studio 2013 fails miserably - I have to use Visual Studio 2010 (which
doesn't support C++11 too well). On OS X I'm facing the same problem, I need
to compile OpenBabel with -stdlib=libstdc++, which means I need to compile
my code with the same standard library. So both on OS X and on Windows I'm
stuck with C++03.
I'm using the latest stable release - 2.3.2.
Does the bleeding edge version support C++11? Are there any plans to
support it in the future?
Thank you,
Itay.
----------------------------------------------------------------------------
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
<mailto:OpenBabel-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
_____
No virus found in this message.
Checked by AVG - www.avg.com <http://www.avg.com>
Version: 2014.0.4716 / Virus Database: 3986/7928 - Release Date: 07/27/14
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss