Results 1 to 3 of 3

Thread: QT Resource File (.qrc) data not getting linked statically with application

  1. #1
    Join Date
    Aug 2009
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QT Resource File (.qrc) data not getting linked statically with application

    Hi,

    I have a an application where i am storing resource through qrc mechanism. I have the code split in shared library which is getting lnked with the application. All my QRC resources gets displayed properly if i link it dynamically with library. But i don't get my resourcs displayed when i link the same application statically with the library.

    Am i missing something trivial here ?

    Please help,

  2. #2
    Join Date
    Oct 2009
    Posts
    151
    Thanks
    6
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT Resource File (.qrc) data not getting linked statically with application

    Have you included a RESOURCES = file.qrc in your .pro file?

  3. #3
    Join Date
    Aug 2009
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT Resource File (.qrc) data not getting linked statically with application

    SOLVED!!!



    The problem was that i had missed making call to Q_INIT_RESOURCE(resource_name) in my main application[main.cpp].

    As per QT documentation, this is required when the program is statically built.



    Thanks.

Similar Threads

  1. Statically linked program doesn't load QImage from file.
    By badjer1024 in forum Qt Programming
    Replies: 3
    Last Post: 19th March 2009, 18:45
  2. Application seems not to be linked statically
    By Boron in forum Installation and Deployment
    Replies: 5
    Last Post: 2nd April 2008, 17:14
  3. Statically linked QtSql modules
    By runderwo in forum Qt Programming
    Replies: 5
    Last Post: 10th September 2007, 22:43
  4. Replies: 1
    Last Post: 18th April 2007, 20:48
  5. statically linked executable
    By smalls in forum Qt Programming
    Replies: 8
    Last Post: 11th February 2006, 02:09

Tags for this Thread

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.