Under what conditions will you get unresolved external symbol for __declspec(dllimport)?

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2009-10-14T18:57:35Z Indexed on 2012/11/11 11:02 UTC
Read the original article Hit count: 139

Filed under:
|
|
|
|

I am converting an application to use .dlls and I'm riddled with linker errors stating

unersolved external symbol"__declspec(dllimport) public: void __thiscall Rail::SetNextrail(class Rail *)"

There is more gibberish at the end of this error message. Why should this happen and how do you fix it? __declspec(dllimport) is being placed with a macro defined as:

#ifdef LUDOAI_EXPORT
#define DECLSPECAI __declspec(dllexport)
#else
#define DECLSPECAI __declspec(dllimport)
#endif

© Stack Overflow or respective owner

Related posts about c++

Related posts about visual-studio