Hello,

I have a shared library that works perfectly with mingw-32bit compiler. On MSVC2013-64bit compiler however I get a strange problem.
Qt Code:
  1. unresolved external symbol *__declspec(dllimport) .....
To copy to clipboard, switch view to plain text mode 

The problem is caused by a class in my shared library that is defined as:
Qt Code:
  1. class TEST_IMPORT_EXPORT className { .... }
To copy to clipboard, switch view to plain text mode 

TEST_IMPORT_EXPORT is defined as :
Qt Code:
  1. #ifdef BUILD_TEST_DLL
  2. #define TEST_IMPORT_EXPORT Q_DECL_EXPORT
  3. #else
  4. #define TEST_IMPORT_EXPORT Q_DECL_IMPORT
  5. #endif
To copy to clipboard, switch view to plain text mode 

I was wondering why the error says something about "dllImport" so I changed class definition to
Qt Code:
  1. class Q_DECL_EXPORT className { .... }
To copy to clipboard, switch view to plain text mode 
and the MSVC2013-64bit works fine!

But I for sure think its not the right way to fix this issue. Can someone provide me more info as to what might be going on here?!

Thanks

Regards
Vikram