Results 1 to 2 of 2

Thread: Linking to Libraries (HIDAPI)

  1. #1
    Join Date
    Apr 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Linking to Libraries (HIDAPI)

    Hi,

    I have moved a design from Qt4.7.0 to Qt5.5 MSVC2010 version. I am having trouble trying to get the HIDAPI linked in propperly.

    In my .pro I use this
    LIBS += "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib\\SetupAPI.lib"
    SOURCES += windows/hid.cpp

    But I get this:
    Creating library release\SeaWolf.lib and object release\SeaWolf.exp
    hid.obj : error LNK2019: unresolved external symbol __imp__SetupDiDestroyDeviceInfoList@4 referenced in function _hid_enumerate
    hid.obj : error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceInterfaceDetailA@24 referenced in function _hid_enumerate
    hid.obj : error LNK2019: unresolved external symbol __imp__SetupDiEnumDeviceInterfaces@20 referenced in function _hid_enumerate
    hid.obj : error LNK2019: unresolved external symbol __imp__SetupDiGetClassDevsA@16 referenced in function _hid_enumerate
    release\SeaWolf.exe : fatal error LNK1120: 4 unresolved externals

    Could someone help me work though getting the .lib linked?

    BR
    Mark

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Linking to Libraries (HIDAPI)

    Were your libraries built with MSVC210? Are you using the right dllimport macros? (Assuming the libraries are delivered as DLLs)

Similar Threads

  1. Linking with third-party libraries
    By blooglet in forum Newbie
    Replies: 2
    Last Post: 22nd December 2011, 10:26
  2. Linking to GLU libraries
    By beginQT in forum Newbie
    Replies: 0
    Last Post: 26th October 2011, 11:08
  3. Linking to libraries
    By Maluko_Da_Tola in forum Newbie
    Replies: 3
    Last Post: 17th October 2010, 12:19
  4. Linking Third party Libraries
    By jsmith in forum Qt Programming
    Replies: 1
    Last Post: 13th October 2009, 06:18
  5. linking libraries
    By JustaStudent in forum Newbie
    Replies: 29
    Last Post: 2nd May 2006, 08:30

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.