April 25, 2011

imrrk imrrk
Ant Farmer
216 posts

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

Page  
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

48 replies

April 25, 2011

secretNinja secretNinja
Lab Rat
141 posts

Including pro-files into pro-files [developer.qt.nokia.com] . Is this helpful?

April 25, 2011

imrrk imrrk
Ant Farmer
216 posts

,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

April 25, 2011

secretNinja secretNinja
Lab Rat
141 posts

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.

April 25, 2011

Gerolf Gerolf
Mad Scientist
3005 posts

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…

 Signature 

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

April 25, 2011

secretNinja secretNinja
Lab Rat
141 posts

Most likely you don’t need all of this.

April 25, 2011

leon.anavi leon.anavi
Mad Scientist
699 posts

imrrk wrote:
,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

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 [doc.qt.nokia.com] ?

Regards,
Leon

 Signature 

http://anavi.org/

April 26, 2011

imrrk imrrk
Ant Farmer
216 posts

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

April 26, 2011

leon.anavi leon.anavi
Mad Scientist
699 posts
imrrk wrote:
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

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 [doc.qt.nokia.com]
INCLUDEPATH [doc.qt.nokia.com]
LIBS [doc.qt.nokia.com]

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

 Signature 

http://anavi.org/

April 26, 2011

imrrk imrrk
Ant Farmer
216 posts

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

April 26, 2011

imrrk imrrk
Ant Farmer
216 posts

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

April 26, 2011

imrrk imrrk
Ant Farmer
216 posts

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..

  1. TEMPLATE=lib
  2. 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….

  1. win32:
  2. {
  3. LIBS += -L../test-build-simulator/debug
  4. }
  5. LIBS += -ltest
  6. }

wether i am proceeding correctly….

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

April 26, 2011

Gerolf Gerolf
Mad Scientist
3005 posts

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.

 Signature 

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

April 26, 2011

leon.anavi leon.anavi
Mad Scientist
699 posts
imrrk wrote:
thanks leon ,but i want to know how to create a lib file of my project

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 [developer.qt.nokia.com]

imrrk wrote:
  1. win32:
  2. {
  3. LIBS += -L../test-build-simulator/debug
  4. }
  5. LIBS += -ltest
  6. }
wether i am proceeding correctly….

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

 Signature 

http://anavi.org/

April 26, 2011

imrrk imrrk
Ant Farmer
216 posts

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

April 26, 2011

imrrk imrrk
Ant Farmer
216 posts

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

Page  
1

  ‹‹ :: error: [\NokiaQtSDK\Symbian\SDK\epoc32\release\gcce\udeb\Video.exe] Error 1      Why I can’t install my sis package on phone? ››

You must log in to post a reply. Not a member yet? Register here!