2

having this error although shlwapi.h has been included..

Error LNK2019 unresolved external symbol __imp__PathCombineW@12 referenced in function "bool __cdecl Fs::_pathCombine(wchar_t *,wchar_t * const,wchar_t * const)" (?_pathCombine@Fs@@YA_NPA_WQA_W1@Z) NewZeV C:\Users\mike\Desktop\workspace\NV\fs.obj 1

code snippet

bool Fs::_pathCombine(LPWSTR dest, const LPWSTR dir, const LPWSTR file)
{
LPWSTR p = (LPWSTR)file;
if (p != NULL)while (*p == '\\' || *p == '/')p++;
return CWA(shlwapi, PathCombineW)(dest, dir, p) == NULL ? false : true;
}

how do I ago about solving this linking error? I'm using visual studio 2015

  • Also note that your question title is not what the error message says. – IInspectable Jun 13 '16 at 19:38
  • sorry man, but I don't know why you think the question is not what the error says, I'm having a linking error, unresolved external symbol, i noticed the duplicate alright before posting, but still i can't get how to apply a solution to my case! I will like to specify that I don't get the error using codeblocks but only MVS – user3374754 Jun 13 '16 at 19:50
  • Title: *"unresolved external symbol _pathCombineW()"* - Error message: *"unresolved external symbol __imp__PathCombineW@12"*. Anyway, the duplicate has the solution to your problem. – IInspectable Jun 13 '16 at 20:00
  • which is ? is not like I want you to do my dirty job for me, just indicate the right direction..which of the solutions please ? – user3374754 Jun 13 '16 at 20:07

1 Answers1

2

You need to link with shlwapi.lib.

AStopher
  • 4,207
  • 11
  • 50
  • 75
RbMm
  • 31,280
  • 3
  • 35
  • 56