Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Adding lib files and their paths in .pro file [Closed]
Forum Updated to NodeBB v4.3 + New Features

Adding lib files and their paths in .pro file [Closed]

Scheduled Pinned Locked Moved Mobile and Embedded
49 Posts 7 Posters 28.5k Views 1 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.
  • I Offline
    I Offline
    imrrk
    wrote on last edited by
    #1

    Hello friends,I have 3 different projects say
    1.pro,2.pro and 3.pro
    now i want to combine(integrate) them in a new project file say 4.pro,so that i can use their functionality ,in 4.pro .

    so please tell me how i can do it..

    regards
    imrrk

    1 Reply Last reply
    0
    • S Offline
      S Offline
      secretNinja
      wrote on last edited by
      #2

      "Including pro-files into pro-files":http://developer.qt.nokia.com/wiki/IncludingProFiles . Is this helpful?

      1 Reply Last reply
      0
      • I Offline
        I Offline
        imrrk
        wrote on last edited by
        #3

        ,hey i read it,but suppose i have a push button in say 4.pro and the fuction on click has been written in 3.pro so whether your link provides me the solution for this..

        thanks
        imrrk

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

          Normally you won't have a button in one project and its onClick in another ... they should be in one class which will be in one project.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            The only option to have classes in one project and the slots in another would be to have a class in project 1 which is exportet and then used inside the other. but members inside one project should never be used in others...

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • S Offline
              S Offline
              secretNinja
              wrote on last edited by
              #6

              Most likely you don't need all of this.

              1 Reply Last reply
              0
              • L Offline
                L Offline
                leon.anavi
                wrote on last edited by
                #7

                [quote author="imrrk" date="1303743420"],hey i read it,but suppose i have a push button in say 4.pro and the fuction on click has been written in 3.pro so whether your link provides me the solution for this..

                thanks
                imrrk[/quote]

                Honestly it seems like a bad architecture to me. Why don't you split them into "several libraries and include them at your new project":http://doc.qt.nokia.com/qtcreator-snapshot/creator-project-qmake-libraries.html ?

                Regards,
                Leon

                http://anavi.org/

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  imrrk
                  wrote on last edited by
                  #8

                  hi leon,i want to do exactly what u r saying but,abd o checked your link and tried it,but i am using nokia qt sdk version 1.0 and in the last step of project management dialog,the option of add project is disabled

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    leon.anavi
                    wrote on last edited by
                    #9

                    [quote author="imrrk" date="1303793675"]hi leon,i want to do exactly what u r saying but,abd o checked your link and tried it,but i am using nokia qt sdk version 1.0 and in the last step of project management dialog,the option of add project is disabled[/quote]

                    Hi imrrk,

                    Unfortunately I am not Qt Creator expert and I cannot advise you. But whatever Qt Creator is doing it can be done manually but you will have to read the documentation carefully. Some useful links:
                    "qmake Manual":http://doc.qt.nokia.com/4.7/qmake-manual.html
                    "INCLUDEPATH":http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#includepath
                    "LIBS":http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#libs

                    LIBS and INCLUDEPATH are important keywords that you should use to point out which libraries do you want to include and what is the path to the header files.

                    Best regards,
                    Leon

                    http://anavi.org/

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      imrrk
                      wrote on last edited by
                      #10

                      thanks leon ,but i want to know how to create a lib file of my project

                      1 Reply Last reply
                      0
                      • I Offline
                        I Offline
                        imrrk
                        wrote on last edited by
                        #11

                        hi gerolf,I will explain it in detail,now i have already created a application,and now i want to add few more dialogs at the beginning of my application,so for that i have created a diffrent project and know i want just to integrate these two projects..so please help me out..
                        for example i have a dialog in which i have taken a push button so on click on this pushbutton i want to open a dialog which is present in the another project file,so please help me out,i hope my isssue is clear to you,I apologize if nay mistakes

                        thanks
                        imrrk

                        1 Reply Last reply
                        0
                        • I Offline
                          I Offline
                          imrrk
                          wrote on last edited by
                          #12

                          Actually i hv one pushButton in different project file and on the click of push button it should refer to a Mainwindow which is present in another project file..i created the lib file of one project say test.pro in the below way..
                          @
                          TEMPLATE=lib
                          CONFIG+=dll
                          @
                          After writing this code in test.pro file and when i build it..i get two files test.a and test.dll in test-buildsimulator folder..

                          Now i added this path of the lib file in my test1.pro file in the following way....

                          @
                          win32:
                          {
                          LIBS += -L../test-build-simulator/debug
                          }
                          LIBS += -ltest
                          }
                          @
                          wether i am proceeding correctly....

                          [edit: code highlighted with @ tags / Denis Kormalev]

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            giesbert
                            wrote on last edited by
                            #13

                            Then your push button should be connected to a signal of your dialog. your dialog is exported so you can connect to it from outside the lib. The push button is not accessible from outside.

                            This is a normal C++ issue, hide members from being used from outside of the class.

                            Nokia Certified Qt Specialist.
                            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                            1 Reply Last reply
                            0
                            • L Offline
                              L Offline
                              leon.anavi
                              wrote on last edited by
                              #14

                              [quote author="imrrk" date="1303796480"]thanks leon ,but i want to know how to create a lib file of my project[/quote]

                              I think you are on the right way as you have already started to rework the project. For hints regarding dynamic library you can also check "this thread":http://developer.qt.nokia.com/forums/viewthread/5204/

                              [quote author="imrrk" date="1303802132"]
                              @
                              win32:
                              {
                              LIBS += -L../test-build-simulator/debug
                              }
                              LIBS += -ltest
                              }
                              @
                              wether i am proceeding correctly....
                              [/quote]

                              I am just wondering which is your target platform because here I see win32 and the thread is in Mobile and Embedded section?

                              http://anavi.org/

                              1 Reply Last reply
                              0
                              • I Offline
                                I Offline
                                imrrk
                                wrote on last edited by
                                #15

                                hi leon ,i am working for symbian device..only and whether we should include these lines ?
                                and hey please help me about the pushbutton issue

                                1 Reply Last reply
                                0
                                • I Offline
                                  I Offline
                                  imrrk
                                  wrote on last edited by
                                  #16

                                  hey gerolf,i am not getting you..........

                                  1 Reply Last reply
                                  0
                                  • L Offline
                                    L Offline
                                    leon.anavi
                                    wrote on last edited by
                                    #17

                                    Hi imrrk,

                                    For Symbian specific things use symbian at the .pro file.

                                    In this case it is highly recommended to a look at this article at Forum Nokia about "shared libraries on Qt for Symbian":http://wiki.forum.nokia.com/index.php/Shared_Library_DLLs_on_Qt_for_Symbian

                                    If you are planning to develop commercial software please note the remarks about UID and Symbian Signed - you might need to sign your DLL too!

                                    P.S.
                                    Please try to avoid spam and combine your message in a single post or edit existing post when it is possible.

                                    http://anavi.org/

                                    1 Reply Last reply
                                    0
                                    • G Offline
                                      G Offline
                                      giesbert
                                      wrote on last edited by
                                      #18

                                      Hi imrrk,

                                      you should design a clean dialog.

                                      So your dialog might have custom signals-. How they are emitted does not matter to the user of the dialog, also not which widgets are placed on it. The signal can be emitted when the push butrton is pressed.

                                      @
                                      MyDialog::MyxDialog()
                                      {
                                      UI = new ...
                                      ui->setupUI(this);

                                      connect(ui->button, SIGNAL(clicked()), this, SIGNAL(myClickedSignal()))
                                      

                                      }
                                      @

                                      This is pseudo code, not build, not tested

                                      Nokia Certified Qt Specialist.
                                      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        andre
                                        wrote on last edited by
                                        #19

                                        Note that this topic has been explained more than once already. Like in "this":http://developer.qt.nokia.com/forums/viewthread/5144/ thread. Your case is not so different, so learn from the answers that are already there first.

                                        1 Reply Last reply
                                        0
                                        • I Offline
                                          I Offline
                                          imrrk
                                          wrote on last edited by
                                          #20

                                          hi Gerolf

                                          Actually my dialog where i have a pushbutton is in one project file and the dialog which i want to connect it through this pushbutton is in another project file and both project files are in seperated folder,i.e i have created one project file and my friend has created another project file,so i want to integrate these two diffrent projects

                                          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