George,

I compiled your example with gcc, everything works fine there.


Igor

On Fri, 2009-02-20 at 16:25 +0000, George Oakman 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.
>  
>  
>  
>  
>  
>  
>  
>  
> 
> 
> ______________________________________________________________________
> Beyond Hotmail - see what else you can do with Windows Live Find out
> more!
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________ Rdkit-discuss mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Reply via email to