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. help in qmake
Qt 6.11 is out! See what's new in the release blog

help in qmake

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 3 Posters 1.9k Views 2 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.
  • S Offline
    S Offline
    saber
    wrote on last edited by
    #1

    this is the structure of my app's qmake .
    0_1526556189789_i.png

    "qpdflib" is the library and i used that lib in corepdf.

    what i want to do this is i want only two qmake .
    one is for the library and another is for the whole app(includeing the lib)

    how can i do that?

    sierdzioS 1 Reply Last reply
    0
    • S saber

      this is the structure of my app's qmake .
      0_1526556189789_i.png

      "qpdflib" is the library and i used that lib in corepdf.

      what i want to do this is i want only two qmake .
      one is for the library and another is for the whole app(includeing the lib)

      how can i do that?

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @saber said in help in qmake:

      how can i do that?

      You can't. With qmake, if you have to keep 2 separate projects under one umbrella, you have to use a thirds .pro file with SUBDIRS template.

      There is a workaround, although a bit more cumbersome:
      keep both projects separate (no subdirs), and simply open them separately in Qt Creator. You will have to remember to manually build your library first, and your app second.

      (Z(:^

      1 Reply Last reply
      1
      • S Offline
        S Offline
        saber
        wrote on last edited by
        #3

        ok.so i tried this

        0_1526564162043_e.png

        giving me this warning

        0_1526564200819_re.png

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          So you resigned from compiling the library and are compiling directly in your source code. Please remember that if you are using LGPL library that breaks the license terms.

          Apart from that, this is a valid solution, indeed. I thought you did not want to do it like that ;-)

          Regarding multiple definitions: check the headers, check if header guards (#pragma or ifdefs) are there, check if the same header is included twice and has some methods defined in the header (that's most likely source of this error). If so, then correct these issues (by moving the methods to source files or declaring them (probably) inline).

          (Z(:^

          S 1 Reply Last reply
          1
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi
            You include corepdf.cpp twice.
            in SOURCE +=
            That gives that error.

            1 Reply Last reply
            2
            • sierdzioS sierdzio

              So you resigned from compiling the library and are compiling directly in your source code. Please remember that if you are using LGPL library that breaks the license terms.

              Apart from that, this is a valid solution, indeed. I thought you did not want to do it like that ;-)

              Regarding multiple definitions: check the headers, check if header guards (#pragma or ifdefs) are there, check if the same header is included twice and has some methods defined in the header (that's most likely source of this error). If so, then correct these issues (by moving the methods to source files or declaring them (probably) inline).

              S Offline
              S Offline
              saber
              wrote on last edited by saber
              #6

              @sierdzio
              i did not know that it could brack the license. i willing not do that.

              the problem is i will include this corepdf in my app CoreBox.
              for this i need one qmake for my main app that could include all the cpp and header file including corepad's library.

              how can i do that??

              note : @mrjj your solution works. but what i will do for licensing??

              mrjjM sierdzioS 2 Replies Last reply
              0
              • S saber

                @sierdzio
                i did not know that it could brack the license. i willing not do that.

                the problem is i will include this corepdf in my app CoreBox.
                for this i need one qmake for my main app that could include all the cpp and header file including corepad's library.

                how can i do that??

                note : @mrjj your solution works. but what i will do for licensing??

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @saber
                But is not all of CoreBox open source already ?
                So user can recompile and change corepdf is he wants.

                S 1 Reply Last reply
                0
                • mrjjM mrjj

                  @saber
                  But is not all of CoreBox open source already ?
                  So user can recompile and change corepdf is he wants.

                  S Offline
                  S Offline
                  saber
                  wrote on last edited by
                  #8

                  @mrjj
                  yes .corebox is in GPLv2.
                  but qpdf library is not in same license .
                  qpdf is in LGPL.

                  i don't know much about mixing licensing .

                  mrjjM 1 Reply Last reply
                  0
                  • S saber

                    @mrjj
                    yes .corebox is in GPLv2.
                    but qpdf library is not in same license .
                    qpdf is in LGPL.

                    i don't know much about mixing licensing .

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @saber

                    • i don't know much about mixing licensing .

                    Well im not sure it it will be mixed as such.
                    Since qpdf will stay LGPL regardless.
                    But since all is open source, im not sure it will be an issue.

                    S 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @saber

                      • i don't know much about mixing licensing .

                      Well im not sure it it will be mixed as such.
                      Since qpdf will stay LGPL regardless.
                      But since all is open source, im not sure it will be an issue.

                      S Offline
                      S Offline
                      saber
                      wrote on last edited by saber
                      #10

                      @mrjj

                      so your suggesting that i can include the library in same qmake?

                      i will be great !!!

                      note : i found this

                      0_1526569384451_a.png
                      see the last term == "Same license (library)"

                      mrjjM 1 Reply Last reply
                      0
                      • S saber

                        @mrjj

                        so your suggesting that i can include the library in same qmake?

                        i will be great !!!

                        note : i found this

                        0_1526569384451_a.png
                        see the last term == "Same license (library)"

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @saber
                        Hi
                        Well if you include the files directly its not really a lib but compiled into exe.
                        but yes, with the normal IANAL (im not a lawyer) disclaimer.
                        Since user can change version of corepdf if they want, i think
                        LGPL is satisfied.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          saber
                          wrote on last edited by
                          #12

                          ok .
                          before doing that i will inform the author .

                          mrjjM 1 Reply Last reply
                          0
                          • S saber

                            ok .
                            before doing that i will inform the author .

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            @saber
                            Good idea. You could ask him.

                            1 Reply Last reply
                            0
                            • S saber

                              @sierdzio
                              i did not know that it could brack the license. i willing not do that.

                              the problem is i will include this corepdf in my app CoreBox.
                              for this i need one qmake for my main app that could include all the cpp and header file including corepad's library.

                              how can i do that??

                              note : @mrjj your solution works. but what i will do for licensing??

                              sierdzioS Offline
                              sierdzioS Offline
                              sierdzio
                              Moderators
                              wrote on last edited by
                              #14

                              @saber said in help in qmake:

                              the problem is i will include this corepdf in my app CoreBox.

                              Your corebox is GPLv2 so there is no license conflict. You can safely include qpdf.

                              If you want to include corepdf you have to ask the author - license file is missing so the author has full copyright and shared none of it (even if they don't know about it - often people post on GitHub assuming they share their code with the world, but without license file that is not the case).

                              Side note: a new module QtPdf is being created by KDAB https://www.kdab.com/browse-pdfs-in-a-qt-widgets-application/ an will )probably) be part of upstream Qt in the future.

                              (Z(:^

                              1 Reply Last reply
                              3

                              • Login

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