Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Statically Link Libraries
QtWS25 Last Chance

Statically Link Libraries

Scheduled Pinned Locked Moved Solved C++ Gurus
6 Posts 2 Posters 540 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.
  • S Offline
    S Offline
    Shruthi
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • S Offline
        S Offline
        Shruthi
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Shruthi
          wrote on last edited by
          #4

          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
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            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
            0
            • S Offline
              S Offline
              Shruthi
              wrote on last edited by
              #6

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

              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