George,

Sure, here it is (I named your file t.cpp):
g++ -c -I ../rdkit-svn/Code -I ../rdkit-svn/External/vflib-2.0/include/
-I ../boost_1_37_0 t.cpp

export LD_LIBRARY_PATH=../rdkit-svn/bin/

g++ -o t t.o -L ../rdkit-svn/bin/ -lRDGeneral -lGraphMol -lRDGeometry 

 ./t
[12:37:07]  Hello RDKit 

Hope this helps,
Igor


On Sat, 2009-02-21 at 09:13 +0000, George Oakman wrote:
> Hi,
>  
> Thanks for trying with gcc. 
>  
> When I compile and link with bjam and toolset=msvc it works for me
> too, but it is when I try to complie using the build process
> integrated with Visual C++ Express that I get the runtime error.
>  
> It would be very kind if you could let me have your command line for
> compiling and linking with gcc, this might help me turn the right
> options on on Visual C++.
>  
> Thanks a lot.
>  
> George.
> 
>  
> > Subject: Re: [Rdkit-discuss] Developing on Visual C++
> > From: [email protected]
> > To: [email protected]
> > CC: [email protected]
> > Date: Fri, 20 Feb 2009 12:07:17 -0500
> > 
> > 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
> > 
> 
> 
> ______________________________________________________________________
> Share your photos with Windows Live Photos – Free Find out more!
-- 
Igor Filippov [Contr] <[email protected]>


Reply via email to