Demiurg HG wrote: > Hi, > > I'm trying to use OB for loading Cube-files. > > I'd done things described here (VS2008): > http://openbabel.org/wiki/Install_%28MSVC%29#Compiling_the_2.3.x_series_.28subversion_trunk.29. > Then I put openbabel-2.lib, headers and openbabel-2.dll to appropriate > places. > > Now my code looks like this: > > #include "openbabel/mol.h" > #include "openbabel/obconversion.h" > > #pragma comment( lib, "../ob/lib/openbabel-2.lib" ) > > void LoadCube(const char *path) { > OBConversion conv; > OBMol mol; > VERIFY( conv.SetInFormat("CUBE") ); // SetInFormat returns false. > VERIFY( conv.ReadFile(&mol, path) ); > } > > What I did wrong?
OpenBabel looks for chemical file formats in *.obf files at runtime. So you need to have formats_compchem.obf on your PATH. Chris ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ OpenBabel-Devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-devel
