On Ubuntu 10, I'm trying to compile this hello world program at:

     http://openbabel.org/api/2.2.0/start.shtml

The c++ and make files I'm using are attached.

I am getting the attached errors indicating it can't include the open babel 
libraries.

To install open babel, I used the synaptic package manager.  I tried installing 
the openbabel, libopenbabel3, and libopenbabel-dev packages.

I also tried uninstalling these packages and then installing via the 
instructions at (installed globally with root access):

http://openbabel.org/wiki/Install_%28source_code%29

This seems to have the same effect as installing the openbabel package with the 
synaptic package manager.  The install output did NOT indicate that the libxml 
package is installed, though the instructions indicate that most functionality 
will still be there without it.

The instructions indicate that you have to set theLD_LIBRARY_PATH environment 
variable to include the directory where the libopenbabel.so file is.  I typed 
'locate openbabel', and the only .so files were these:

/usr/lib/libopenbabel.so.3
/usr/lib/libopenbabel.so.3.0.3
/usr/local/lib/libopenbabel.la
/usr/local/lib/libopenbabel.so
/usr/local/lib/libopenbabel.so.3
/usr/local/lib/libopenbabel.so.3.0.3

I accordingly typed: export LD_LIBRARY_PATH=/usr/local/lib (the LD_LIBRARY_PATH 
variable was empty before).

While the openbabel program is available via the command line, the above 
program 
still can't find the include libraries.  I'm I missing something?

Seth


      

Attachment: Makefile
Description: Binary data

Attachment: test.cc
Description: Binary data

set...@setcal-laptop:~/Chemistry/openbabel$ make
g++ -g -Wall   -c -o test.o test.cc
test.cc:4:27: error: openbabel/mol.h: No such file or directory
test.cc:5:36: error: openbabel/obconversion.h: No such file or directory
test.cc: In function ‘int main(int, char**)’:
test.cc:10: error: ‘OBConversion’ was not declared in this scope
test.cc:10: error: expected ‘;’ before ‘conv’
test.cc:14: error: ‘conv’ was not declared in this scope
test.cc:16: error: ‘OBMol’ was not declared in this scope
test.cc:16: error: expected ‘;’ before ‘mol’
test.cc:17: error: ‘mol’ was not declared in this scope
test.cc:25: error: ‘mol’ was not declared in this scope
make: *** [test.o] Error 1
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
OpenBabel-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to