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.
On 11/21/2016 02:29 PM, Geoffrey Hutchison wrote:
> 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.
Actually, some of them don't ship .a libs in -devel packages anymore so
you can have all the right paths and it'll still fail. See if you have
"-static" in your build options.
Longer explanation: you can link your code to dynamic libraries (.so) or
create a self-contained "static" executable. The latter requires a
"static" library that some linux distribution vendors and/or package
maintainers no longer provide.