Results 1 to 2 of 2

Thread: How to link to a DLL in PRO file

  1. #1
    Join Date
    Dec 2008
    Posts
    68

    Default How to link to a DLL in PRO file

    Hello,

    I created two QT c++ projects in Windows. One is about algorithms and it makes a dll (algorithms.dll). the other is a test application.

    In the PRO file for the test application, I added one line:

    LIBS += algorithms.lib

    this lib is the corresponding lib file for that dll.

    But when I compile the vc project created by this PRO file, I got the link error

    error LNK2001: unresolved external symbol "public: virtual void __....

    Obviously, the definitions in dll cann't be found during the link process.

    Can anyone help me with this problem?

    Thank you very much!

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to link to a DLL in PRO file

    Did you export symbols? If not, try searching the forums for "Q_DECL_EXPORT".
    J-P Nurmi

Similar Threads

  1. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  2. Replies: 4
    Last Post: 24th November 2007, 13:33
  3. file renaming on windows
    By jdd81 in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2007, 19:41
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. How to link modified file
    By awalesminfo in forum Newbie
    Replies: 4
    Last Post: 22nd March 2006, 17:24

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.