question

reet15-5788 avatar image
0 Votes"
reet15-5788 asked reet15-5788 commented

LNK2001 unresolved external symbol __imp__ImageNtHeader@4

Why am I getting the error LNK2001 unresolved external symbol __imp__ImageNtHeader@4 and how can I resolve it. I'm running a c++ windows console app on x86. And I get this error when running the console app which uses ImageNtHeader in it a few times.

c++vs-debugging
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GuidoFranzke avatar image
1 Vote"
GuidoFranzke answered reet15-5788 commented

Hello,
you must add Dbghelp.lib to your project.
Read the documentation: nf-dbghelp-imagentheader
Regards, Guido

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks so much GuidoFranzke I can't believe it was that simple I didn't know you had to add the lib as I thought it was just included with Visual Studio 2019.

0 Votes 0 ·