0

I have a cpp file that has these includes:

#include <windows.h>
#include <sspi.h>
#include <stdio.h>
#include <string>
#include <credssp.h>

When trying to run AcquireCredentialsHandleW I get..

unresolved external symbol __imp_AcquireCredentialsHandleW referenced in function main

MSDN says it is in sspi.h.

  • You are confusing the declaration (found in sspi.h) and the implementaion found in Secur32.lib. You need to link with the library to fix the `unresolved external symbol` error. See the __Requirements__ section here: https://learn.microsoft.com/en-us/windows/win32/secauthn/acquirecredentialshandle--general – Richard Critten Mar 09 '21 at 14:49

1 Answers1

0

Go in the properties dialog of your project. You need to add the Secur32.lib files in the property below: Configuration Properties -> Linker -> Input -> Additional Dependencies.

Markus Schumann
  • 7,636
  • 1
  • 21
  • 27