Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jun 2005

    Question How to link to static library in QT .pro file


    I'm porting a qt static library to s60 qt. The static library builds fine with
    TEMPLATE = lib
    CONFIG += staticlib
    CONFIG += debug_and_release
    CONFIG += precompile_header
    However I don't know how to link to this static library in other qt project file.
    In other platforms it seems to work fine with
    LIBS += mystaticlib
    statement, but that doesn't work with S60 QT.

    Any ideas?

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2007

    Re: How to link to static library in QT .pro file


    In your other project's pro file add .lib ending to your static library's name. Then regenerated MMP file contain STATICLIBRARY statement in front of your library name and the library should work ok.

    Other way seems to be to build your static library with armv5. Because when the pro file is parsed, static libraries should locate at EPOCROOT\Epoc32\release\armv5\udeb or urel folder. (I guess nothing stops you from copying gcce libs there too).

    For more details how static libs are recognized (at least in garden):
    symmake.cpp : SymbianMakefileGenerator::writeMmpFileLibraryPart(QTextStream& t)

    I would expect that this function is fixed before final release so that also static libraries are checked from other folders too.

  3. #3
    Registered User
    Join Date
    Jun 2005

    Re: How to link to static library in QT .pro file

    Thanks, adding that .lib worked

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2009
    Minnesota, USA

    Re: How to link to static library in QT .pro file

    I can't make this work. Please see http://discussion.forum.nokia.com/fo...d.php?t=191960 and http://discussion.forum.nokia.com/fo...d.php?t=192043 and see if you have any suggestions for me.

Similar Threads

  1. Python for UIQ
    By cassioli in forum Python
    Replies: 141
    Last Post: 2008-06-11, 18:16
  2. problem when importing from carbide c++ to vs 2003!
    By misfit.physics in forum Symbian Tools & SDKs
    Replies: 12
    Last Post: 2008-02-19, 09:45
  3. Could not open local link 3gp file in Nokia N95 Browser?
    By xiatao in forum Mobile Web Site Development
    Replies: 5
    Last Post: 2007-05-25, 10:00
  4. Replies: 1
    Last Post: 2005-05-26, 14:22
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts