It perfect now, thanks a lot
Marianne
________________________________
De : Noel O'Boyle [via Open Babel]
[ml-node+3627940-839242757-248...@n4.nabble.com]
Date d'envoi : lundi 27 juin 2011 17:04
À : Seijo Marianne
Objet : Re: API C++ problem: Compilation is ok, but no results with the
executable
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 <[hidden email]<UrlBlockedError.aspx>>
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
> [hidden email]<UrlBlockedError.aspx>
> 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
[hidden email]<UrlBlockedError.aspx>
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
________________________________
If you reply to this email, your message will be added to the discussion below:
http://forums.openbabel.org/API-C-problem-Compilation-is-ok-but-no-results-with-the-executable-tp3627917p3627940.html
To start a new topic under Open Babel, email
ml-node+957263-426239497-248...@n4.nabble.com
To unsubscribe from Open Babel, click
here<http://forums.openbabel.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=957263&code=bWFyaWFubmUuc2Vpam9AZXBmbC5jaHw5NTcyNjN8MTM3MDUyNjk3Mw==>.
--
View this message in context:
http://forums.openbabel.org/API-C-problem-Compilation-is-ok-but-no-results-with-the-executable-tp3627917p3627959.html
Sent from the openbabel-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
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