Hello,
I have a shared library that works perfectly with mingw-32bit compiler. On MSVC2013-64bit compiler however I get a strange problem.
unresolved external symbol *__declspec(dllimport) .....
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:
class TEST_IMPORT_EXPORT className { .... }
class TEST_IMPORT_EXPORT className { .... }
To copy to clipboard, switch view to plain text mode
TEST_IMPORT_EXPORT is defined as :
#ifdef BUILD_TEST_DLL
#define TEST_IMPORT_EXPORT Q_DECL_EXPORT
#else
#define TEST_IMPORT_EXPORT Q_DECL_IMPORT
#endif
#ifdef BUILD_TEST_DLL
#define TEST_IMPORT_EXPORT Q_DECL_EXPORT
#else
#define TEST_IMPORT_EXPORT Q_DECL_IMPORT
#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
class Q_DECL_EXPORT className { .... }
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
Bookmarks