Hi Geoff,
Yes I have my OBConversion object.
Here is the code that compiles correctly:
OpenBabel::OBConversion conv(&ifs,&ofs);
if(!conv.SetInAndOutFormats(informat,"mol2")){
strcpy(error,"ERROR: OpenBabel: Formats not available\n");
return 0;
}
I havent heard of any environment variables before that points to the formats.
When the libopenbabel file is shipped to another system, I change the
DYLD_LIBRARY_PATH / LD_LIBRARY_PATH (Mac or Linux) environment variables so
that I can find the library.
Thanks.
________________________________
De : Geoff Hutchison [ge...@geoffhutchison.net]
Date d'envoi : 11 mai 2012 15:00
À : Gaudreault, Francis
Cc : openbabel-disc...@lists.sf.net
Objet : Re: [Open Babel] linking to libopenbabel
Everything compiles without any errors. However, everytime I execute my
application and run into the function SetInAndOutFormats, the API returns the
following:
"Formats not available"
Have you created an OBConversion object? The C++ constructor will load the
formats. You may also need to set environment variables -- the compilation sets
the path to the format libraries.
Hope that helps,
-Geoff
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss