Results 1 to 5 of 5

Thread: Statically add DLLs to the project, where with .lib file?

  1. #1
    Join Date
    Oct 2009
    Posts
    70
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Statically add DLLs to the project, where with .lib file?

    I have DLL, which has got class I need to link it with EXE, where to add lib file?

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Statically add DLLs to the project, where with .lib file?

    Put your DLL in the same directory as your executable.

  3. #3
    Join Date
    Oct 2009
    Posts
    70
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Statically add DLLs to the project, where with .lib file?

    Huh? If I put .lib file to the same directory as the executable, it doesn't do anything. I must compile .lib file with executable...but I must reference on this file, or not?

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Statically add DLLs to the project, where with .lib file?

    You need to add all paths and libraries your executable references in your project file, just like any other library.

  5. #5
    Join Date
    May 2010
    Location
    Czestochowa, Poland
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Statically add DLLs to the project, where with .lib file?

    You need to configure your .pro file. For example if you have a library you want to use called MyLibrary, then edit your project as follows.
    Qt Code:
    1. LIBS += -L<directory_with_library> -lMyLibrary
    To copy to clipboard, switch view to plain text mode 
    Q7Goodies - The sweetest way to add Windows 7 features to your Qt application

Similar Threads

  1. Replies: 2
    Last Post: 5th March 2010, 09:26
  2. Replies: 1
    Last Post: 3rd December 2009, 23:34
  3. Statically linked program doesn't load QImage from file.
    By badjer1024 in forum Qt Programming
    Replies: 3
    Last Post: 19th March 2009, 18:45
  4. how can i run a project from only a .ui file in qt4
    By iamjayanth in forum Qt Programming
    Replies: 2
    Last Post: 23rd October 2008, 01:36
  5. Replies: 3
    Last Post: 26th July 2006, 13:23

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.