Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to include so files (libraries).
Forum Updated to NodeBB v4.3 + New Features

How to include so files (libraries).

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 2.0k Views
  • 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
    jenya7
    wrote on last edited by
    #1

    I build a library and generated so files.
    Include it in pro file
    INCLUDEPATH += /home/pi/pawn/build
    But the project doesn't see no header files no objects.
    What do I do wrong?

    jsulmJ 1 Reply Last reply
    0
    • J jenya7

      I build a library and generated so files.
      Include it in pro file
      INCLUDEPATH += /home/pi/pawn/build
      But the project doesn't see no header files no objects.
      What do I do wrong?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @jenya7 Did you read https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html ?
      /home/pi/pawn/build looks like a build folder, include files are usually not copied to build folder.
      INCLUDEPATH should point to source folder containing the header files.
      You also have to add LIBS which points to the library files you want to link.
      https://doc.qt.io/qt-5/qmake-variable-reference.html#libs

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      2
      • jsulmJ jsulm

        @jenya7 Did you read https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html ?
        /home/pi/pawn/build looks like a build folder, include files are usually not copied to build folder.
        INCLUDEPATH should point to source folder containing the header files.
        You also have to add LIBS which points to the library files you want to link.
        https://doc.qt.io/qt-5/qmake-variable-reference.html#libs

        J Offline
        J Offline
        jenya7
        wrote on last edited by
        #3

        @jsulm said in How to include so files (libraries).:

        @jenya7 Did you read https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html ?
        /home/pi/pawn/build looks like a build folder, include files are usually not copied to build folder.
        INCLUDEPATH should point to source folder containing the header files.
        You also have to add LIBS which points to the library files you want to link.
        https://doc.qt.io/qt-5/qmake-variable-reference.html#libs

        I see. So I included
        INCLUDEPATH += /home/pi/pawn/amx
        and now it's OK. I don't understand why do I need so files if all sources included in amx folder.
        It makes sense to include LIBS+= l???? just can't figure what is a library in the folder.

        jsulmJ 1 Reply Last reply
        0
        • J jenya7

          @jsulm said in How to include so files (libraries).:

          @jenya7 Did you read https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html ?
          /home/pi/pawn/build looks like a build folder, include files are usually not copied to build folder.
          INCLUDEPATH should point to source folder containing the header files.
          You also have to add LIBS which points to the library files you want to link.
          https://doc.qt.io/qt-5/qmake-variable-reference.html#libs

          I see. So I included
          INCLUDEPATH += /home/pi/pawn/amx
          and now it's OK. I don't understand why do I need so files if all sources included in amx folder.
          It makes sense to include LIBS+= l???? just can't figure what is a library in the folder.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @jenya7 said in How to include so files (libraries).:

          I don't understand why do I need so files

          Well, you want to use a library (.so), right? How else should it work? Or is your library header-only?
          " just can't figure what is a library in the folder" - it is a *.so file in the build folder of your library project.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          J 1 Reply Last reply
          1
          • jsulmJ jsulm

            @jenya7 said in How to include so files (libraries).:

            I don't understand why do I need so files

            Well, you want to use a library (.so), right? How else should it work? Or is your library header-only?
            " just can't figure what is a library in the folder" - it is a *.so file in the build folder of your library project.

            J Offline
            J Offline
            jenya7
            wrote on last edited by
            #5

            @jsulm said in How to include so files (libraries).:

            @jenya7 said in How to include so files (libraries).:

            I don't understand why do I need so files

            Well, you want to use a library (.so), right? How else should it work? Or is your library header-only?
            " just can't figure what is a library in the folder" - it is a *.so file in the build folder of your library project.

            Thank you. Now it makes sense to me. :)

            1 Reply Last reply
            0

            • Login

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