Results 1 to 4 of 4

Thread: QextSerialPort, QextSerialEnumerator, VS2008 issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Posts
    20
    Thanked 2 Times in 2 Posts

    Default QextSerialPort, QextSerialEnumerator, VS2008 issue

    Hi all,

    I have problem with compilation of QextSerialEnumerator example from QextSerialPort lib.
    I use Qt 4.6 + VS2008.

    I compiled library (version from https://qextserialport.googlecode.com/hg/) so I have 4 files - lib and dll for debug and release.
    Event example compiled without errors, but I cannot compile enumerator example.

    The problem occurs when I call QextSerialEnumerator::getPorts();.
    during compilation I get unresolved externals errors.

    As I remember I hadn't this issue with MinGW compiler ...

    Thx in advance!

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: QextSerialPort, QextSerialEnumerator, VS2008 issue

    and those unresolved externals are?

  3. #3
    Join Date
    Sep 2009
    Posts
    20
    Thanked 2 Times in 2 Posts

    Default Re: QextSerialPort, QextSerialEnumerator, VS2008 issue

    Sorry...

    Qt Code:
    1. qextserialport.lib(qextserialenumerator.obj) : error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceRegistryPropertyW@28 referenced in function "private: static class QString __cdecl QextSerialEnumerator::getDeviceProperty(void *,struct _SP_DEVINFO_DATA *,unsigned long)" (?getDeviceProperty@QextSerialEnumerator@@CA?AVQString@@PAXPAU_SP_DEVINFO_DATA@@K@Z)
    2. qextserialport.lib(qextserialenumerator.obj) : error LNK2019: unresolved external symbol __imp__SetupDiOpenDevRegKey@24 referenced in function "private: static bool __cdecl QextSerialEnumerator::getDeviceDetailsWin(struct QextPortInfo *,void *,struct _SP_DEVINFO_DATA *,unsigned int)" (?getDeviceDetailsWin@QextSerialEnumerator@@CA_NPAUQextPortInfo@@PAXPAU_SP_DEVINFO_DATA@@I@Z)
    3. qextserialport.lib(qextserialenumerator.obj) : error LNK2019: unresolved external symbol __imp__SetupDiDestroyDeviceInfoList@4 referenced in function "private: bool __thiscall QextSerialEnumerator::matchAndDispatchChangedDevice(class QString const &,struct _GUID const &,unsigned int)" (?matchAndDispatchChangedDevice@QextSerialEnumerator@@AAE_NABVQString@@ABU_GUID@@I@Z)
    4. qextserialport.lib(qextserialenumerator.obj) : error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceInstanceIdW@20 referenced in function "private: bool __thiscall QextSerialEnumerator::matchAndDispatchChangedDevice(class QString const &,struct _GUID const &,unsigned int)" (?matchAndDispatchChangedDevice@QextSerialEnumerator@@AAE_NABVQString@@ABU_GUID@@I@Z)
    5. qextserialport.lib(qextserialenumerator.obj) : error LNK2019: unresolved external symbol __imp__SetupDiEnumDeviceInfo@12 referenced in function "private: bool __thiscall QextSerialEnumerator::matchAndDispatchChangedDevice(class QString const &,struct _GUID const &,unsigned int)" (?matchAndDispatchChangedDevice@QextSerialEnumerator@@AAE_NABVQString@@ABU_GUID@@I@Z)
    6. qextserialport.lib(qextserialenumerator.obj) : error LNK2019: unresolved external symbol __imp__SetupDiGetClassDevsW@16 referenced in function "private: bool __thiscall QextSerialEnumerator::matchAndDispatchChangedDevice(class QString const &,struct _GUID const &,unsigned int)" (?matchAndDispatchChangedDevice@QextSerialEnumerator@@AAE_NABVQString@@ABU_GUID@@I@Z)
    To copy to clipboard, switch view to plain text mode 

    Also I couldn't compile lib from cmd (qmake, nmake) I imported proj. to VS (qmake -tp vc) and then was ok.

    Thx in advance!

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: QextSerialPort, QextSerialEnumerator, VS2008 issue

    Add '#pragma comment (lib, "Setupapi.lib")' to your source file.

Similar Threads

  1. Using libs built in VS2008?
    By laserbeak43 in forum Qt Programming
    Replies: 7
    Last Post: 16th November 2009, 01:17
  2. QtAnimationFramework and VS2008
    By estel in forum Newbie
    Replies: 1
    Last Post: 19th October 2009, 08:20
  3. Qt project with .net parts(vs2008)
    By deemeetar in forum Newbie
    Replies: 0
    Last Post: 29th September 2009, 12:30
  4. Replies: 4
    Last Post: 30th January 2008, 10:00
  5. 4.4tp with vs2008 compile problem
    By Teerayoot in forum Installation and Deployment
    Replies: 1
    Last Post: 11th January 2008, 06:56

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.