LNK 2019 - 解析的外部符号(LNK 2019 - Unresolved External

2019-09-19 11:51发布

我得到下面的链接错误。

1>------ Build started: Project: NowHook, Configuration: Debug Win32 ------
1>Compiling...

1>NowHook.CPP
1>Linking...

1>NowHook.obj : error LNK2019: unresolved external symbol __imp__VirtualProtect@16 referenced in function "void __cdecl 

1>NowHook.obj : error LNK2019: unresolved external symbol __imp__GetProcAddress@8 referenced in function "void __cdecl 

1>NowHook.obj : error LNK2019: unresolved external symbol __imp__LoadLibraryA@4 referenced in function "void __cdecl HookSend(void)" (?HookSend@@YAXXZ)

1>C:\Users\JAGAN\Documents\Visual Studio 2008\Projects\HookNow\Debug\NowHook.dll : 
fatal error LNK1120: 3 unresolved externals

1>Build log was saved at "file://c:\Users\JAGAN\Documents\Visual Studio 2008\Projects

我已经包括
1)链接器/普通/ AdditionalLibraryDirectories
2)链接器/输入/附加依赖

Answer 1:

你缺少KERNEL32.LIB在你的链接器/输入/附加依赖

请确保您设置附加依赖于“所有配置”和“所有平台”。



文章来源: LNK 2019 - Unresolved External Symbol