I have built an app in Qt Creator on Windows, and it builds and runs correctly.

I have received header, .lib and .dll from a vendor built with Visual Studio on Windows. I would like to link to to their libraries. I do not have access to their source code.

I'm using the g++ toolset and fail at link time (exported symbols, I assume). The vendor's VendorClass.h, VendorClass.lib and VendorClass.dll are all in "C:/Program Files/VendorTools/lib"

My .pro file has
Qt Code:
  1. INCLUDEPATH += "C:/Program Files/VendorTools/lib"
  2. LIBS += -L"C:/Program Files/VendorTools/lib" -lVendorClass
To copy to clipboard, switch view to plain text mode 

I edit the vendor's header file so that it reads:
Qt Code:
  1. class Q_DECL_IMPORT VendorClass
  2. {
  3. public:
  4. VendorClass();
  5. }
To copy to clipboard, switch view to plain text mode 

(I've also tried declaring the class with __declspec(dllimport) ), same results.

Error is something like:
undefined reference to '__imp___ZN5VendorClassC1ERKSs'
dumpbin /linkermember VendorClass.lib shows a decorated class name that differs from the linker error I get from Qt.

How do I properly declare and compile a class so that it will link to a VC2008-compiled .lib for a .dll? Or is there a compiler flag that is required for properly using a Windows dll.