Results 1 to 2 of 2

Thread: Adding library in another project

  1. #1
    Join Date
    Apr 2011
    Posts
    25
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default Adding library in another project

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

    Now on click of pushButton that is present in test1 project i hv written the code as below

    void Mainwindow:n_Clicked_PushButton()
    {
    Mainwindow1 a(this); //this window is present in test project
    a.show();
    }

    the error i am getting is Mainwindow1 is not found..plz help me

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Adding library in another project

    You have to set INCLUDEPATH in your pro file
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Replies: 4
    Last Post: 18th December 2009, 18:55
  2. adding dll to existing project...
    By aj2903 in forum Qt Programming
    Replies: 1
    Last Post: 1st December 2009, 09:35
  3. How do to add a library to my project?
    By N3wb in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2009, 06:11
  4. Adding an external Library
    By afflictedd2 in forum Qt Programming
    Replies: 1
    Last Post: 13th December 2008, 05:51
  5. adding a qt-ui to a non-qt project, dll
    By TheKedge in forum Qt Programming
    Replies: 3
    Last Post: 28th February 2007, 17:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.