Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Statically Link Libraries

    C++ Gurus
    2
    6
    250
    Loading More Posts
    • 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.
    • S
      Shruthi last edited by

      Hi everyone,

      The subproject and the main project should have different .exe file.
      Could anyone suggest me how to change the .pro file of main project and the subproject. Or how to statically link the main project libraries to the subproject.

      Suggestions are appreciated. Thank you.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Split things properly and then set proper order of build.

        Start by the library and then build the two executables.

        Each application is just a classic app template. Nothing special about them.

        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 Reply Quote 0
        • S
          Shruthi last edited by

          Okay. Thank you for your reply. I will check and get back to you.
          @SGaist

          1 Reply Last reply Reply Quote 0
          • S
            Shruthi last edited by

            In the main project I am using GUI and in subproject I am using terminal to print the result. In the subproject I removed all the GUI related files. And running through terminal. By doing so I am getting error while calling API itself.

            And for the main project I have used the 3rd party dynamically linked .so files.

            I have just copied the main.pro file to the subproject.pro. by removing the headers and sources related to the GUI. But still it's not running.

            How do I link the .so file libraries from the main project to the subproject.

            Please let me know.
            Thanks in advance.
            @SGaist

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              The proper split would be to have one subproject that creates the library and then two others, one for the command line and one for the GUI that will link to that library.

              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 Reply Quote 0
              • S
                Shruthi last edited by

                Thank ou so much. It worked for me.
                @SGaist

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post