You have copied openbabel-2.dll to the exe folder, but you also need
to copy all of the plugins. These have extension .obf.

- Noel

On 27 June 2011 15:56, Marianne Seijo <marianne.se...@epfl.ch> wrote:
> Hello
>
> I am new to using the openbabel API and really exciting to use OB. I have an
> existing C++ program in MSVC2008, I would like to use some of the functions
> in Openbabel (Isomorphism).
>
> I followed the instructions on the website and built the windows-vc2008 and
> then tried to add the sample code in C++  to make test of the results first:
>
> ------------------
> #include <openbabel/obconversion.h>
> #include <openbabel/mol.h>
>
> using namespace std;
> using namespace OpenBabel;
>
> int _tmain(int argc,char **argv) {
>        // Read molecule from SMILES string
>
>        OBConversion conv;
>        OBMol mol;
>        conv.SetInFormat("smi");
>            conv.ReadString(&mol, "C(Cl)(=O)CCC(=O)Cl");
>
>
>
>        // Print out some general information
>
>            conv.SetOutFormat("can");
>        cout<<"Canonical SMILES: "<<conv.WriteString(&mol)<<endl;
>        cout<<"The molecular weight is "<< mol.GetMolWt();
>
>
>          return 0; // exit with success
>  }
> ---------------
>
> Everything compile fine but when I execute the code, I obtain
>
> ---------------
> Canonical SMILES:
> The molecular weight is 0
>
> ---------------
>
> I link this small program with
> 1) Include files:
> openbabel-2.3.0\windows-vc2008\build\include
> openbabel-2.3.0\windows-vc2008\include
> openbabel-2.3.0\include
>
> 2) Source file:
> openbabel-2.3.0\src
>
> 3) Lib file:
> openbabel-2.3.0\windows-vc2008\build\src\Release\openbabel-2.lib
>
>
> openbabel-2.dll is added  in the exe folder.
>
>
> Help will be really appreciate.I probably forget something important. Thank
> you
>
>
> Marianne
>
> --
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to