Results 1 to 3 of 3

Thread: How to link windows .res file

  1. #1
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default How to link windows .res file

    I am using Qt 4.7.3 with Qt Creator 2.2.1 and building an application for Windows desktop.
    I am wanting to create a windows resource and have created a .rc file, run the rc compiler and generated the .res file.
    My question is, how do I link my application to the .res file?
    Do I need to specify this in the .pro file and if so how?
    Or is there something I need to do in the project settings?
    I have tried searching but couldn't find anything.

    Thanks.

  2. #2
    Join Date
    Feb 2011
    Location
    Romania
    Posts
    53
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1
    Thanked 11 Times in 9 Posts

    Default Re: How to link windows .res file


  3. #3
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: How to link windows .res file

    Thanks, I have got it working.
    I had seen the RC_FILE variable in the searches I did, however it was not clear to me whether I should use it with the .rc file or the .res file and when I tried it, neither worked.
    It turns out you should use the .rc file and that you do not need to add custom build steps to call the rc compiler. In my inexperience my problem was that I was not adding the correct path to my .rc file.
    So I had RC_FILE = MyApp.rc and the error I got was that there was no rule to make the .rc file. When I now tried it with RC_FILE = ../Source/MyApp.rc it works.

Similar Threads

  1. Replies: 11
    Last Post: 5th May 2011, 15:05
  2. How to link to Coin3d and SoQt with Qt4.5 in Windows
    By jwieland in forum Qt Programming
    Replies: 0
    Last Post: 23rd June 2009, 17:37
  3. Link error in Windows
    By lni in forum Qt Programming
    Replies: 1
    Last Post: 14th March 2009, 06:27
  4. How to link to a DLL in PRO file
    By richardander in forum Qt Programming
    Replies: 1
    Last Post: 23rd December 2008, 13:30
  5. Link errors for plugin under windows
    By QPlace in forum Qt Programming
    Replies: 5
    Last Post: 2nd November 2008, 16:51

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
  •  
Qt is a trademark of The Qt Company.