Hi,

 

Thanks for looking into that. Yes, my piece of code is so simple that it must 
be a problem with the way I compile and link.

 

Thanks,

 

George.


 
> Date: Fri, 20 Feb 2009 21:59:56 +0100
> Subject: Re: [Rdkit-discuss] Developing on Visual C++
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> 
> George,
> I don't see any obvious problems with your simple example and do not
> have easy access to a windows machine at the moment. I will give it a
> try next week; In the meantime maybe someone else who uses windows can
> comment?
> 
> - greg
> 
> On e2/20/09, George Oakman <[email protected]> wrote:
> >
> > Hi all,
> >
> >
> >
> > I am trying to write a piece of C++ code with the RDKit C++ library (I'm
> > using Visual C++ Express edition as the development environment).
> >
> >
> >
> > Thank you very much for the GettingStarted example in C++, that works fine.
> > I can compile the GettingStarted example using bjam very well, so I guess
> > this is good news.
> >
> >
> >
> > I am now trying to create a proper Visual C++ project (WIN32 console app)
> > and compile via the Build process on Visual C++. So far so good, I have a
> > mini program that compiles and outputs a "Hello RDKit" using BOOST_LOG:
> >
> >
> >
> > #include <stdio.h>
> >
> > #include "GraphMol/RDKitBase.h"
> > #include "RDGeneral/RDLog.h"
> >
> > using namespace RDKit;
> >
> > int main(int argc, char *argv[])
> > {
> > RDLog::InitLogs();
> >
> > BOOST_LOG(rdInfoLog)<<" Hello RDKit "<<std::endl;
> > return 0;
> > }
> >
> >
> >
> > This is a Win32 Console Application, that I link with libRDGeneral.lib
> > libGraphMol.lib libRDGeometry.lib
> >
> >
> >
> > The piece of code above executes fine (although I receive the following
> > warning at link time: warning LNK4098: defaultlib 'MSVCRT' conflicts with
> > use of other libs; use /NODEFAULTLIB:library).
> >
> >
> >
> > Things start breaking when I try to create a molecule object with RWMol
> > *mol=new RWMol();
> >
> >
> >
> > #include <stdio.h>
> >
> > #include "GraphMol/RDKitBase.h"
> > #include "RDGeneral/RDLog.h"
> >
> > using namespace RDKit;
> >
> > int main(int argc, char *argv[])
> > {
> > RDLog::InitLogs();
> >
> > RWMol *mol=new RWMol();
> >
> > BOOST_LOG(rdInfoLog)<<" Hello RDKit "<<std::endl;
> > return 0;
> > }
> >
> >
> >
> > This piece of code compiles and links well (same warning as before) but, at
> > runtime, I receive a 'buffer overflow' on line 28 in RWMol.h:
> >
> >
> >
> > RWMol() { d_partialBonds.clear(); }
> >
> >
> >
> >
> >
> > Am I missing something obvious?
> >
> >
> > Sorry, I know you are not really supporting VC++ and prefer the
> > boost.build/bjam framework, but maybe someone else is developing using
> > Visual C++ projects and could help me.
> >
> >
> >
> > Thanks for your help,
> >
> >
> >
> > George.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > _________________________________________________________________
> > Check out the new and improved services from Windows Live. Learn more!
> > http://clk.atdmt.com/UKM/go/132630768/direct/01/

_________________________________________________________________

Hotmail, Messenger, Photos  and more - all with the new Windows Live. Get 
started! 
http://www.download.live.com/

Reply via email to