Results 1 to 5 of 5

Thread: Undefined reference to '_imp__SetupDiGetClassDevsW@16' error

  1. #1
    Join Date
    Oct 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Smile Undefined reference to '_imp__SetupDiGetClassDevsW@16' error

    Hi,

    I'm a newbie here! I'm currently coding for IOCTL.
    Need help to find solution in the following errors.

    Undefined reference to '_imp__SetupDiGetClassDevsW@16'
    Undefined reference to '_imp__SetupDiEnumDeviceInterfaces@20'
    Undefined reference to '_imp__SetupDiGetDeviceInterfaceDetailW@24'
    Undefined reference to '_imp__SetupDiGetDeviceRegistryPropertyW@28'
    collect2: Id returned 1 exit status


    I used QT version 4.8.1 for Desktop and
    I already tried to add QT += qt3support in .pro file, but it didn't work.

    Any help will be very much appreciated.
    Thanks..

  2. #2
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: Undefined reference to '_imp__SetupDiGetClassDevsW@16' error

    first clean the project, qmake and rebuild it if doesn't worked then the library has some problems and is better to re-install it!

  3. #3
    Join Date
    Oct 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Undefined reference to '_imp__SetupDiGetClassDevsW@16' error

    Hi alizadeh91,

    Thanks for your response, but after clean, qmake, and rebuild the project, it still didn't work.
    Then after re-install Qt, it's still error.. I already included setupapi.h. Did I missed something to include?
    For additional info, I'm using a 64-bit platform. Is it possible that the error is related to that environment?

    Thanks!

  4. #4
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: Undefined reference to '_imp__SetupDiGetClassDevsW@16' error

    i'm afraid not!. can you build a simple example with your qt (without qt3support module)???
    Last edited by alizadeh91; 3rd November 2012 at 07:55.

  5. #5
    Join Date
    Oct 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Undefined reference to '_imp__SetupDiGetClassDevsW@16' error

    Hi,

    I already fixed the problem..
    After including setupAPI.lib path in the .pro file, no more error occurs.

    Btw, thanks alizadeh91 for the responses. Very much appreciated.

Similar Threads

  1. undefined reference to vtable error
    By PaulDaviesC in forum Newbie
    Replies: 4
    Last Post: 20th April 2012, 17:11
  2. Replies: 5
    Last Post: 24th January 2011, 23:14
  3. Getting Undefined Reference Error
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 2
    Last Post: 22nd June 2009, 03:12
  4. error undefined reference ...............
    By amit_pansuria in forum Qt Programming
    Replies: 2
    Last Post: 8th June 2007, 15:28
  5. Undefined Reference error!!!
    By Kapil in forum Newbie
    Replies: 25
    Last Post: 28th March 2006, 13:03

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.