LNK 2019 - 未解析的外部符号 [英] LNK 2019 - Unresolved External Symbol

查看:43
本文介绍了LNK 2019 - 未解析的外部符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下链接错误.

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) 链接器/输入/附加依赖

I have included
1) Linker/General/AdditionalLibraryDirectories
2) Linker/Input/Additional Dependencies

推荐答案

您的链接器/输入/附加依赖项中缺少 kernel32.lib

You are missing kernel32.lib in your Linker/Input/Additional Dependencies

确保您正在为所有配置"和所有平台"设置附加依赖项.

Make sure you are setting the Additional Dependencies for "All Configurations" and "All Platforms".

这篇关于LNK 2019 - 未解析的外部符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆