Install openbabel on qt
-
Hello, Im newbie in qt...
Im trying to install libraries from openbabel to be used in my qt project, I want to use its classes and methods, I have trying by downloading source code (which is installed on my computer), but I dont know how to use libraries, how can I import them?
Thanks!
-
Hi and welcome to devnet,
It's described here in the Qt documentation.
And if you are using Qt Creator, you can also follow the documentation here.
-
Thanks for your reponse,
I added to pro file this:
INCLUDEPATH += /usr/local/include/openbabel-2.0
LIBS += -L /usr/local/lib/libopenbabel.dylibNow I can include classes from this library but now I have other issues:
:-1: warning: -L path '/usr/local/lib/libopenbabel.dylib' is not a directory
:-1: error: symbol(s) not found for architecture x86_64
:-1: error: linker command failed with exit code 1 (use -v to see invocation)I am not able to fix it anyway, what´s wrong?
Thank you very much!
-
As explained in the documentation, the
-L
parameter is to add folders the list of paths searched by the linker.So to be correct:
LIBS += -L/usr/local/lib/ -lopenbabel
-
Great !
Then please mark the thread as solved using the "Topic Tools" button to that other forum users may know a solution has been found :)