I am moving a class from one project to another in Visual Studio 2015 and this is the error that I get. I cannot find any other examples of this specific error.
Asked
Active
Viewed 4,086 times
0
-
1can you tell where the error appears? – tistCoder Jul 28 '16 at 21:18
-
4attention to **How to Ask** when asking question – BattleTested_закалённый в бою Jul 28 '16 at 21:21
1 Answers
3
__imp_
is __declspec(dllimport)
, and the next underscore indicates that the function is extern "C"
and __cdecl
, leaving _strdup
as the function name. Therefore, going by the MSDN documentation linked in the comments, the symbol __imp___strdup
is:
extern "C" __declspec(dllimport) char* __cdecl _strdup(const char* strSource);
This function requires the header <string.h>
It would appear that the project you moved your class into doesn't use one of the MS libraries that contains the function, for some reason. That's my guess, at least. Try checking each project's properties and seeing if they use the same .lib
files?

Justin Time - Reinstate Monica
- 4,149
- 24
- 40