0

unresolved external symbol __imp_CertFindChainInStore compile error

seems if i include CertFindChainInStore my program wont compile https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certfindchaininstore

  • Does this answer your question? [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Ken White Apr 25 '20 at 21:56
  • You need to link with `Crypt32.lib`. – Paul Sanders Apr 25 '20 at 21:56
  • You're asking us to solve a problem with code we cannot see. You need to provide a [mcve] that demonstrates the issue. You'll find your experiences here will be much better if you spend some time taking the [tour] and reading the [help] pages to learn how the site works before you begin posting. – Ken White Apr 25 '20 at 21:57
  • well paul i think that could do it – Patrick Josefsen Apr 25 '20 at 22:00
  • and i works thank you :) – Patrick Josefsen Apr 25 '20 at 22:02

1 Answers1

0

you need to link Crypt32.lib to address that function

add this at beggning of your cpp file

 #pragma comment ( lib, "Crypt32.lib" )
emaditaj
  • 177
  • 9