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. qt library output in Linux system
Forum Updated to NodeBB v4.3 + New Features

qt library output in Linux system

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 454 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.
  • I Offline
    I Offline
    IknowQT
    wrote on 20 Dec 2021, 04:21 last edited by
    #1

    If you build the library project in Windows, dll or lib file is output.
    In addition, pdb, exp, and ilk files appear, but they are not important files for execution.

    When you build a library project in Linux, .so files appear, so, so.1, so.1.0, so.1.0.0 files appear.

    The problem is, I want to distribute only the important files for execution, but can you tell me which files are necessary for execution?

    I tested it while deleting them one by one, but even if I only have the so.1.0.0 and so.1.0 files, there doesn't seem to be any problem with running
    Is there any way to distribute it as a single file?

    J A 2 Replies Last reply 20 Dec 2021, 06:57
    0
    • I IknowQT
      20 Dec 2021, 04:21

      If you build the library project in Windows, dll or lib file is output.
      In addition, pdb, exp, and ilk files appear, but they are not important files for execution.

      When you build a library project in Linux, .so files appear, so, so.1, so.1.0, so.1.0.0 files appear.

      The problem is, I want to distribute only the important files for execution, but can you tell me which files are necessary for execution?

      I tested it while deleting them one by one, but even if I only have the so.1.0.0 and so.1.0 files, there doesn't seem to be any problem with running
      Is there any way to distribute it as a single file?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 20 Dec 2021, 06:57 last edited by jsulm
      #2

      @IknowQT said in qt library output in Linux system:

      Is there any way to distribute it as a single file?

      Yes, find out which library file name exactly your app links against:

      ldd YOUR_APP_EXE
      

      The above command will print all libs your executable depends on.
      Be aware that your app can link against a specific version of the lib which is then often a symbolic link to the actual library file.

      1 Reply Last reply
      1
      • I IknowQT
        20 Dec 2021, 04:21

        If you build the library project in Windows, dll or lib file is output.
        In addition, pdb, exp, and ilk files appear, but they are not important files for execution.

        When you build a library project in Linux, .so files appear, so, so.1, so.1.0, so.1.0.0 files appear.

        The problem is, I want to distribute only the important files for execution, but can you tell me which files are necessary for execution?

        I tested it while deleting them one by one, but even if I only have the so.1.0.0 and so.1.0 files, there doesn't seem to be any problem with running
        Is there any way to distribute it as a single file?

        A Offline
        A Offline
        anil_arise
        wrote on 20 Dec 2021, 07:08 last edited by
        #3

        @IknowQT

        1. Compile your all libraries (.so) as static (.a) instead of dynamic (.so) .
        2. Include these static libraries in .pro file of your project. Example for libxyz.a : LIBS += -L"/path_to_static/build" -l"lxyz.a"
        J 1 Reply Last reply 20 Dec 2021, 07:10
        0
        • A anil_arise
          20 Dec 2021, 07:08

          @IknowQT

          1. Compile your all libraries (.so) as static (.a) instead of dynamic (.so) .
          2. Include these static libraries in .pro file of your project. Example for libxyz.a : LIBS += -L"/path_to_static/build" -l"lxyz.a"
          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 20 Dec 2021, 07:10 last edited by
          #4
          This post is deleted!
          A 1 Reply Last reply 20 Dec 2021, 07:14
          0
          • J jsulm
            20 Dec 2021, 07:10

            This post is deleted!

            A Offline
            A Offline
            anil_arise
            wrote on 20 Dec 2021, 07:14 last edited by
            #5

            @jsulm He asked ? ,,,, Is there any way to distribute it as a single file?

            J 1 Reply Last reply 20 Dec 2021, 07:15
            0
            • A anil_arise
              20 Dec 2021, 07:14

              @jsulm He asked ? ,,,, Is there any way to distribute it as a single file?

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 20 Dec 2021, 07:15 last edited by
              #6

              @anil_arise Yeah, you're right. Missed the last sentence.

              1 Reply Last reply
              0

              1/6

              20 Dec 2021, 04:21

              • Login

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