Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Install openbabel on qt
Forum Updated to NodeBB v4.3 + New Features

Install openbabel on qt

Scheduled Pinned Locked Moved Solved 3rd Party Software
6 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jss193
    wrote on 28 Aug 2018, 17:10 last edited by
    #1

    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!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 28 Aug 2018, 19:56 last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jss193
        wrote on 29 Aug 2018, 16:22 last edited by
        #3

        Thanks for your reponse,

        I added to pro file this:
        INCLUDEPATH += /usr/local/include/openbabel-2.0
        LIBS += -L /usr/local/lib/libopenbabel.dylib

        Now 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!

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 29 Aug 2018, 19:58 last edited by
          #4

          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
          

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jss193
            wrote on 29 Aug 2018, 21:52 last edited by
            #5

            It worked!

            Thank you for your help!

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 30 Aug 2018, 20:56 last edited by
              #6

              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 :)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              3/6

              29 Aug 2018, 16:22

              • Login

              • Login or register to search.
              3 out of 6
              • First post
                3/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved