I'd keep this on the list, because there are plenty of other people who can 
answer your problem.

You're not linking to libopenbabel:
> g++ Process_Ligand.cpp 
> /tmp/cceu81Mg.o: In function `Convert_2_MOL2(char*, char const*, char const*, 
> char*, int, int)':
> Process_Ligand.cpp:(.text+0x1a70): undefined reference to 
> `OpenBabel::OBConversion::OBConversion(std::istream*, std::ostream*)'

You need to have a -L/path/to/library and -lopenbabel on the command-line.

This isn't really an Open Babel thing, this is a question about how to compile 
and link C++ programs on UNIX/Linux.
http://stackoverflow.com/questions/6141147/how-do-i-include-a-path-to-libraries-in-g

-Geoff


> On Nov 20, 2016, at 10:16 PM, James Johnson <totalboron...@gmail.com> wrote:
> 
> Thank you for the responses.
> 
> I installed libopenbabel-dev with no avail. I looked at the folder location 
> and it was /usr/include/openbabel2.0/openbabel. I reasoned that the extra 
> openbabel2.0 was causing the problem so i moved the openbabel folder directly 
> to /usr/include.
> 
> This fixed the problem of it not recognizing the file, however now there is 
> the problem of a bunch of undefined references.
> 
> Terminal IO: http://pastebin.com/raw/riDc7KQX 
> <http://pastebin.com/raw/riDc7KQX>
> 
> Thanks again for your help!
> 
> - James
> 
> On Sun, Nov 20, 2016 at 4:26 PM, Geoffrey Hutchison 
> <geoff.hutchi...@gmail.com <mailto:geoff.hutchi...@gmail.com>> wrote:
> > I installed openbabel on ubuntu using: sudo apt-get install openbabel
> > I get the error: fatal error: openbabel/obconversion.h: No such file or 
> > directory
> 
> 
> Most Linux distributions do not install the headers or other development 
> interfaces in the standard packages. You'll want to install openbabel-devel 
> (or similar name)
> 
> Hope that helps,
> -Geoff
> 

------------------------------------------------------------------------------
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to